Closed (fixed)
Project:
Drupal core
Version:
6.0-beta1
Component:
menu system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
20 Feb 2006 at 16:40 UTC
Updated:
22 Sep 2007 at 02:37 UTC
Using csv and the new menu system, I found that menus supplied through modules are translated when switching from one language to another (e.g. English -> German).
In menu.inc it reads:
* - 'title' - The displayed title of the menu or menu item. It will already
* have been translated by the locale system.
* - 'description' - The description (link title attribute) of the menu item.
* It will already have been translated by the locale system.
Custom menus are not translated and are not inserted into the locale system (So you cannot translate them at all). That makes using locales or i18n difficult.
I modified following lines in menu.inc in _menu_build():
$_menu['items'][$item->mid]['title'] = t($item->title);
$_menu['items'][$item->mid]['description'] = t($item->description);
With that patch, custom menus are inserted into locale system and can be translated. Caching for user 0 works as before.
Kurt
| Comment | File | Size | Author |
|---|---|---|---|
| menu_inc_101.patch | 933 bytes | kje |
Comments
Comment #1
bdragon commentedDrupal 6 has a rewritten menu system with much better localization support.
Comment #2
bdragon commented