All all know, a battleplan of Drupal 6 was the internationalization with more multilanguage tools.

Unfortunately, these tools only translate node content, and administration. To translate menu, taxonomy, etc... You have to use i18n.

I would like to see nice menu understand the menu translation made by i18n. ATM i18n allow you to choose 2 ways to translate.

- Create a menu item and set its language, so, you have to create a menu item per language
- Create only one menu item, but translate it with the locale system.

It is possible to make nicemenu understand these both case ? if yes, how ?



Members fund testing for the Drupal project. Drupal Association Learn more


zmove’s picture

Status: Active » Needs review
643 bytes


I finally made a patch that support i18n menu translation. As you can see, it's very minimalist and non intrusive, and it works ;)

I use the menu translation via the locale system, so I don't define my menu in one language in i18n, I define an all language menu and I translate them via locale module. So I don't know if it works with the other translation system.

gregc’s picture

This fix doesn't work for me with menu-style = down & position = header : only the top-level menu is translated, not the fly-out submenus. If I move the i18n translation call into theme_nice_menu_build() I can make it translate the children too, however I still have a problem: menu items which link to nodes that are not in the current locale language do not get displayed at all! Optimally, the links would be converted to the proper translated node for the locale using something like translation_path_get_translations(), but I can't seem to find a point where the missing menu items even exist in order to perform the link translation. Hope someone has some thoughts on this, I've spent a lot of time and I think in the end I'll have to go with 2 menus, one for each language.... what a shame not to leverage drupal 6 m16n support!

zmove’s picture


I have nicemenu in drropdown menu with submenu and all are translated.

Make sure it's not an i18n issue that need a patch to be able to translate submenus : #298612: sub-menu items not localized

gregc’s picture

Thanks, the i18n submenu patch made your patch work for me to translate the menu item text. Unfortunately, the menu item links still aren't being translated to point to the correct content per locale. Did you have this problem as well? I made a terrible hack in _menu_link_map_translate of menu.inc to translate the href using translation_path_get_translations, but I there must be a better way. Any thoughts?

zmove’s picture

To translate your menu, did you choose a "any language" option in your menu entry and did you translate them via the locale module ? or did you create a manu item for each language you have ?

add1sun’s picture

Category: support » feature

Changing to "feature request" category.

blueblade’s picture

I am having the same problem as zmove. I am using drupal 6.6 and the latest version of nice menu.
I created the translation using l10n_client and found that items in the source menu are translated but the translations are not showing up in nice menu...I tried removing the source menu and then call it back but that didnt help at all....
Please let me know if you guys already have solution for this other than the patch

Jolidog’s picture

The patch worked for me!

Thank you!!

geodaniel’s picture

946 bytes

The patch seems to be working for me as well. Attached is a slightly cleaned up version with correct spacing and a comment to say what's happening.

geodaniel’s picture

948 bytes

Sorry, that last patch was missing a line ending on the last line.

add1sun’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.