Closed (duplicate)
Project:
Nice Menus
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2011 at 08:55 UTC
Updated:
30 Nov 2012 at 09:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
stred commentedComment #2
Anonymous (not verified) commentedI had the same issue and the patch worked like a charm.
Thanks!
Comment #3
amateescu commentedThe patch from the OP is correct, but has some indentation and file path problems.
Here's a re-roll (with proper credit to stred).
Comment #4
openWeb commentedNot sure what's wrong here but the patch does not change anything - even after multiple cache-clear...
I have a page with 4 languages, first started with Englisch and German, French and Spanish will follow later...
Have created a simple menuitem that links to , Startseite. After Translating this menuitem ("homepage") and applying the patch, still both items are shown in the nice-menu. The links both change according the selected language though...
Comment #5
amateescu commentedI assume you are using Drupal's main menu.
What are your settings in
admin/structure/menu/manage/main-menu/edit? And can you post a screenshot ofadmin/structure/menu/manage/main-menu/translate?Also, how are you outputting your menu? With a theme function inside a template or from a nice_menus block?
Comment #6
openWeb commentedHere are the requested screenshots...
I am using one of the generated nice-menu-blocks.
The whole translation-thingy is working if i place e.g. german articles in the menu andtranslate them to english.
Thanks in advance,
Jens
Comment #7
amateescu commentedAs I suspected, the problem is that those menu items are not linked together as a translated menu item. You should use the 'ubersetzen' link to do that :)
Comment #8
openWeb commentedOh, they are translated, see attached scrrenshots...
Comment #9
amateescu commentedEverything looks ok to me. Are you sure you applied the patch from #3 correctly?
Comment #10
openWeb commentedi really did not apply the patch, i found out the typo before and fixed it manually - after that i found this thread and the patch ;-)
Correct lines on server:
// Allow i18n module to translate strings where available.
if (module_exists('i18n_menu')) {
i18n_menu_localize_tree($menu);
}
Comment #11
Anonymous (not verified) commentedI had the same problem ... I updated the file manually but forgot some "_" and it cost me 2 days of work!
As stated on the patch the correct code must be:
// Allow i18n module to translate strings where available.
if (module_exists('i18n_menu')) {
$menu = i18n_menu_localize_tree($menu);
}
Comment #12
openWeb commentedHi... I changed my code (seem to be blind), emptied cache 3-4 times -> no difference... Still have "Startseite" besides "Homepage"....
Comment #13
amateescu commentedI'm running out of ideas here.. What is your i18n version?
Comment #14
openWeb commentedIt's 7.x-1.0-beta6
Comment #15
amateescu commentedHmm, can you upgrade to beta7?
Comment #16
openWeb commentedIt works!!
the server did not show up the new i18n-version, but after updating everything works like expected... Thanks a lot!
Comment #17
czigor commentedThe patch worked for me, thanks!
Comment #18
vordude commentedCommitted with cc80852ab22fd046. Thanks.
Comment #19
vordude commentedComment #21
didaka commentedWhen menu item is set to language neutral and is only localized nice menu renders unlocalized title with
'#title' => $menu_item['link']['link_title'],
What fixes the problem is to set ['link_title'] to ['title']
Patch is attached bellow.
Comment #22
natukIndeed #21 solves this problem for me as well.
Thanks
Comment #23
tribsel commentedyeah,that (#21) worked for me too.
Comment #24
nicolas bouteille commentedYeah ! #21 made it possible for me to work with Entity Translation and keep the same menu item for all languages (making it neutral) but allowing to translate the title and description.
Comment #25
fraweg commentedHello,
for me this #21 patch does not work. Must I use patch #3 together with #21?
Thanks for any help!
Best regards
Frank
Comment #26
Wuk commentedFrank,
Try patch from comment #17.
Those patches are made against clean latest 2.x-dev and clean 2.1 version.
If it works, please, close this issue as duplicate of that issue.
Kind regards,
Wuk
Comment #27
fraweg commentedBingo! with comment #17 everything works! Thanks a lot!
Frank
Comment #28
kristen polNot sure why @fraweg closed this... the patch from #21 still needs to be committed. It makes Entity Translation menu items work.
Comment #29
Wuk commentedHe closed it because it's a duplicate of translated menu items displayed in the default language.