Closed (fixed)
Project:
Internationalization
Version:
7.x-1.0-beta5
Component:
Menus
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2011 at 22:20 UTC
Updated:
12 Jun 2012 at 11:12 UTC
I am trying to translate a menu item, here are the steps i took:
But still when i visit the /en page the menu item is not translated. Any help would be appreciated.
Comments
Comment #1
bluemaro commentedAre you using a nice menu module for your main menu? I had a similar problem with that module. I've noticed that in i18n_menu_localize_tree function (i18n_menu.module) probably wrong value is translated?
In current version:
Shouldn't it be?:
I'm a new drupal user so I'm not sure whether it's a bug in i18n_menu module or in a nice menu module which uses $link['link_title'] value instead of $link['title']. Can anyone confirm that?
Comment #2
Michsk commentedThanks for the input, it did not solve the issue tough. I am not using a menu module, the way i display the menu is trough a block in a region.
Comment #3
Michsk commentedWhen i do a:
in i18n_menu.module @365, then the translated string isn't even in the $link array.
Comment #4
jose reyero commentedIt's in the $item array.
Comment #5
jose reyero commentedComment #7
ClaudeS-1 commentedI've had major problems getting MegaMenu menu items to be localized (using i18n 7.x-1.4). First problem was that MegaMenu had no localization functionality built in.
Second problem was exactly what bluemaro found, and I'm surprised that a year later the error is still there...
I don't understand how localization is working for people with this code, as the localized title never overwrites the default title in the $tree variable. You're probably right that many menus are incorrectly/cheekily using $link['title'] instead of $link['link_title']
This post is the first (only?) reference I've found to the typo, so will take the appropriate actions to get it looked into.
Comment #8
versantus.nik commented@ClaudeS did you find anything more about this? I'm having problems with Nice Menus and localization - specifically it appears that the "title" is being translated, but the "link_title" is used in the output (and so is not translated).
Like you, I'm surprised this isn't more prevalent, so perhaps there's a combination of factors involved?