A lot of people have been asking me how I got Thesis theme and qtranslate to work correctly…
So I thought I would share what works for me.
This is what you need to change to get the home button on your page menu to respect which language is selected and not revert back to the default language.
Now updated to translate the menu titles aswell…
Please bear in mind this way involves editing Thesis theme core files (this means that you will need to redo this hack each time you upgrade Thesis)
As always please backup the file before starting to edit it.
You need to edit /functions/lib/nav_menu.php
around line 25 find
echo '
<li class="tab tab-home' . $is_current . '"><a href="' . get_bloginfo('url') . '"' . $home_nofollow . '>' . $home_text . '</a></li>
' . "\n";
replace with
echo '
<li class="tab-home' . $is_current . '"><a class="tab" href="' . get_bloginfo('url', 'display') . '" ' . $home_nofollow . '>' . $home_text . '</a></li>
' . "\n";
This should code edit should resolve your problems of the home link on your menu resetting to the default language.
around line 125 (this allows the title mouse over to be dealt with qtranslate)
echo '
<li' . $tab .'><a href="' . get_page_link($nav_item['id']) . '" title="' . $title . '">' . $link_text . '</a></li>
' . "\n";
replace with
echo '
<li' . $tab .'><a ' . $link_class . 'href="' . get_page_link($nav_item['id']) . '" title="' . __($title) . '">' . $link_text . '</a></li>
' . "\n";
save and upload enjoy your functioning home link with thesis theme and qtranslate…
updated now to resolve title tags on page menu…
also you need to replace any use of this
title="' . $title . '"
in /functions/lib/nav_menu.php
with
title="' . __($title) . '"
2nd update now to work with the IE menu setting





Great tutorial works great!
Pleased it helped you…
Can you please share your settings to get the rest of the buttons on your page menu to respect which language is selected? This is another common issue with thesis and qtranslate working together.
This should translate everything on the menu in regards to pages.
Just checked your demo link that you gave me and it does respect the lang.
unless you mean the hover title?
to change hover title replace
title="' . $title . '"with
title="' . __($title) . '"that should do it for you.
Also, please understand I am not prepared to share the whole source code of
nav_menu.phpwith anyone online due to the fact that this is a premium theme and respect the authors copyrighted code….Hi,
I just wanted to clear something up.
I’m using Thesis and qtranslate on a site and the problem I’m having is that the pages buttons on the menu do not pick up the titles I’m entering for each page. When the user switches between languages, the page buttons stays in the default language.
Did you encounter the same problem and if you how were you able to resolve it?
No the menu always follows what language is selected, the only problem normally is that the home did not respect what language is selected and would always resort to default language. Also the hover titles on the menu did not work either.
Now both of these problems are resolved with the code in this post.
If your menu is not translating the page ‘buttons’ as you put it, it seems that your page menu is either hard-coded or done in a different way from the original theme. This is something I cannot know without seeing the code. Maybe you should ask the person who made the theme for you..
[...] more here: qtranslate with thesis theme menu problems | Boring-Group Ltd. Tags: boring-group,, boring-umbrella, boringumbrella, [...]
I am not sure if I am reitterating what has been asked and answered above, but i have edited the nav_menu.php as instructed above, and everything is working corectly, except the nav menu tabs do not display the german page titles. I am very confused and don’t know what to do about it.
I would really appreciate any help you might be able to provide. I can email you the nav_menu.php file if that is any help
the site is http://www.simonsets.com
please excuse the mess, it’s very much in it’s infancy.
Thanks for reading
Had a look at your problem Island, you have a strange one there.
Have you edited the page menu titles in the thesis menu editor? This is the place where you can choose what pages you want to show on the page menu and in what order. There you can also use shortcodes such as
[:en]Mypagetitleenglish[:de]mypagetitlegermanThis should resolve your problems, as I notice that on your menu the hover titles are translating…
Also what version of thesis, qtranslate and wordpress are you running?
Let me know how you get on.
Thanks for the advice mate. The shortcode works perfectly.
Running Wp 2.9.2, Thesis 1.6 and Qt 2.5.6
Thanks for the help! Much appreciated.
Pleased that your menu problems are resolved.
I use WordPress 2.9.2., Thesis 1.7 and qtranslate 2.5.6.. I changed all the codes mentioned above, but still my navigation menu appears in the defeault language. Any suggestions?
Regards,
Nathalie
I resolved the problem mentioned above. But still my mouseovers show something like this:
[:en]Legislation[:nl]Wetgeving. How can I solve this?
Thanks.
Nathalie
Hi Natalie, did you apply these changes change hover title replace ?
If you did I will, have to look at this more closely for you… Let me know if you did…
I will upgrade my testing sites Thesis version to the latest 1.7
Superb solution.
One additional problem with Thesis and qTranslate is that Thesis uses the slogan for the site as the H1 on the first page. This means that the first pages in all languages get the same H1. Is there a way to fix this? Just adding <!–:en–…… in the Slogan filed does not work.
Well if you have tried to use quicktags such as
[:en]this is tagline[:fi]finnish tagline[:se]swedish taglinethen the only thing I could suggest is to write some custom code to add what you need there
eg open up your
custom_functions.phpfile(please backup before editing)
and add this into it
add_action('thesis_hook_header', 'custom_qtranslate_header'); function custom_qtranslate_header() { ?> <h1 id="tagline"><?php _e('[:en]English Tagline[:fi]finnish tagline[:se]swedish tagline');?></h1> <?php }Then in Thesis options turn off “Show site tagline in header”
This should resolve your problem
This:
[:en]this is tagline[:fi]finnish tagline[:se]swedish tagline
did the trick.
Many thanks, Jonas