Closed (fixed)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Aug 2008 at 13:06 UTC
Updated:
11 Apr 2011 at 21:19 UTC
I have a menu with sub-menus. When I try to translate the menu item titles, I can only translate the top level menu item titles ; the sub-menu item titles are not available for translation.
The problem seems to be that function i18nmenu_localize_tree does not recurse. The following patch (against the august 14 dev build) fixes this :
Index: modules/i18n/i18nmenu/i18nmenu.module
===================================================================
--- modules/i18n/i18nmenu/i18nmenu.module (revision 1176)
+++ modules/i18n/i18nmenu/i18nmenu.module (working copy)
@@ -107,6 +107,10 @@
}
}
}
+
+ if ($item['below'] !== false) {
+ i18nmenu_localize_tree($item['below']);
+ }
}
}
Comments
Comment #1
Alice Heaton commentedoops, the patch I posted above fixes the problem that sub-menu items are not available for translation -- but then those translations are not displayed ! Here is a new patch which fixes this. This patch superseed the original patch posted with the issue :
Comment #2
Alice Heaton commentedThird time lucky, there are times where 'below' is NULL rather than FALSE; so to be safe this patch (which superseeds both patches above) should cover all posibilities :
Comment #3
filip.jurcicek commentedIt works for me! Good job.
Comment #4
zmove commentedSame issue, and the patch works forme too.
Comment #5
zmove commentedI pop up this patch because there had a new dev release of i18n and this patch was not committed.
Comment #6
jose reyero commentedApplied, thanks
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
prodosh commentedThis problem has reappeared in Internationalization 6.x-1.9 on Drupal 6.20. Will the patch posted here still work?
Comment #9
prodosh commentedThe problem was fixed by setting the language of the menu items to "All Languages" instead of English or German.
This problem was probably unrelated to this thread.