3

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; 
2
  • What is a reason that you output menu programmatically? Did you check language detection settings? 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/… Commented Jan 9, 2013 at 8:08

2 Answers 2

1

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

0

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.