I recently posted this to the forums, so I hope I'm not repeating it unnecessarily.
After trying several approaches, I discovered that by adding one line of code to i18nmenu.module the menu descriptions could be translated by using the usual localization/manage strings method. I'm on Drupal 5.7, with Internationalization 5.x-2.3.
The line I added (new line 34):
$_menu['items'][$mid]['description'] = t($_menu['items'][$mid]['description']);
The whole function becomes:
function i18nmenu_translate_all(){
global $_menu;
global $user;
global $locale;
$cid = "$user->uid:$locale";
cache_clear_all($cid, 'cache_menu');
// Translate all user defined meny items
foreach($_menu['items'] as $mid => $item) {
if($item['type'] & MENU_CREATED_BY_ADMIN) {
$_menu['items'][$mid]['title'] = t($_menu['items'][$mid]['title']);
$_menu['items'][$mid]['description'] = t($_menu['items'][$mid]['description']); //new line
}
}
I then disabled and enabled the "i18n - menu" module and started searching for the strings and translating. So far it looks like it works. Maybe somebody with more knowledge than me could make this a patch?
Comments
Comment #1
jose reyero commentedNo new features for 5.x.