Hi,
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 ?
thanks
zmove
Comment | File | Size | Author |
---|---|---|---|
#10 | 300628_i18n_menus.patch | 948 bytes | geodaniel |
#9 | 300628_i18n_menus.patch | 946 bytes | geodaniel |
#1 | nice_menus.module.patch | 643 bytes | zmove |
Comments
Comment #1
zmove CreditAttribution: zmove commentedHi,
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.
Comment #2
gregc CreditAttribution: gregc commentedThis 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!
Comment #3
zmove CreditAttribution: zmove commentedHi,
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
Comment #4
gregc CreditAttribution: gregc commentedThanks, 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?
Comment #5
zmove CreditAttribution: zmove commentedTo 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 ?
Comment #6
add1sun CreditAttribution: add1sun commentedChanging to "feature request" category.
Comment #7
blueblade CreditAttribution: blueblade commentedI 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
Comment #8
Jolidog CreditAttribution: Jolidog commentedThe patch worked for me!
Thank you!!
Comment #9
geodaniel CreditAttribution: geodaniel commentedThe 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.
Comment #10
geodaniel CreditAttribution: geodaniel commentedSorry, that last patch was missing a line ending on the last line.
Comment #11
add1sun CreditAttribution: add1sun commentedCommitted to HEAD. http://drupal.org/cvs?commit=188234