i have set up entity translation and everything is working. except for menus. I have a translation set defined for a menu item in "main-menu" and have 2 languages set up for a menu item. However, now both show up in the main menu regardless of which language i am in.

any clues?

its possible my custom menu tree may have something to do with it?

in page.tpl >

$pid = variable_get('menu_main_links_source', 'main-menu');
$tree = menu_tree($pid);
$tree = str_replace(' class="menu"', '', $tree);
$main_menu = drupal_render($tree);
print $main_menu; 
  • What is a reason that you output menu programmatically? Did you check language detection settings?
    – Codium
    Commented Jan 8, 2013 at 10:09
  • to get the 'menu tree' (main menu with children). wrong way maybe? here is my language detection settings (URL and Session on both in that order) i1082.photobucket.com/albums/j364/peterthimaging/…
    – petergus
    Commented Jan 9, 2013 at 8:08

2 Answers 2


Fixed with i18n_menu_translated_tree

$tree = i18n_menu_translated_tree($pid);

as an alert for the next guy, there is some development to move towards i18n_menu_translated_menu_link_alter() http://drupal.org/node/1693074


1) Show menu as tree:

just edit each menu link that must be expanded and check Show as expanded. Than you can enable your menu block.

2) Menu translation:

Each menu title is translatable via standart Drupal form at admin/config/regional/translate/translate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.