I create two menu in each language use the i18n module.
But this two menu always display at the same time no matter which language is the current language.
These menu doesn't related to node.

Can any body help?


kidd1126’s picture

It's happend in theme bluemaster I noticed it's display correct in garland

kidd1126’s picture

I found the solution change all the menu_tree functions into i18n_menu_translated_tree

lolandese’s picture

Thanks. Very useful.

To avoid that the i18n_menu_translated_tree() function gets called while the i18n_menu module isn't active, wrap it inside if (module_exists('i18n_menu)) {..} else {..}. The original menu_tree() function goes in the else {..} section.

An example:

if (module_exists('i18n_menu')) {
$tree = i18n_menu_translated_tree($pid);
else {
$tree = menu_tree($pid);