2
votes

I am working on one Wordpress website. We use twentyeleven theme. Site is available in 3 languages, Czech, English and Russian. For translations we use qTranslate plugin for Wordpress qTranslate plugin .

In the beginning we didn't have any problems with translations. But after some time qTranslate stopped translate navigation menu items. We have 3 menus and each of them has specific items. If I don't select main navigation menu in theme properties then translation works, but all menu items from 3 menus are shown in one big menu, which is not good. If I choose one of these 3 menus as main, then translation stop working. The weird thing is that only menu items don't translate, other parts of website (articles, headers, links) are translated properly.

Have you ever had this kind of problem with this plugin ?

2
ok, so after a while I figured it out. I applied this filter qianqin.de/qtranslate/forum/viewtopic.php?f=4&t=1923 . It messed up my translations of menus. After I deleted it and readd menu items everything works fine. - ARoszoha
do you still have the filter code? I don't see any code when following the link - alex

2 Answers

1
votes

My approach to multilanguage menus in wordpress was:

In the header.php theme file:

<?php wp_nav_menu( array(
                         'theme_location' => 'top_menu',
                         'menu' => 'Menu ' . substr(get_bloginfo ( 'language' ), 0, 2) ,
                         'menu_id' => 'mainnav',
                         'sort_column' => 'menu_order',
                  )); ?>

Then I've created different menus for each language: enter image description here

The function I've used get_bloginfo returns the locale in the qTranslate section: enter image description here

It worked for me. Add suggestions or other plugins to turn this into an easy task.

0
votes

I had the same problem.

In WordPress Dashboard check in Appearance -> Menu under Menu Structure. Click the arrow on the right of the item to reveal additional configuration options and check if Navigation Label names are different when you change languages with q-translate if not add your own translations.

Hope that helps.