Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
i18nmenu_menu_link_alter(&$item, $menu)
contributions/i18n/i18nmenu/i18nmenu.module, line 46
Implementation of hook_menu_link_alter().
Catch changed links, update language and refresh texts
<?php
function i18nmenu_menu_link_alter(&$item, $menu) {
// If we set option to language it causes an error with the link system
// This should handle language only as the links are being manually updated
if (!empty($item['language'])) {
//dsm("Language set");
$item['options']['langcode'] = $item['language'];
} elseif(isset($item['language'])) {
//dsm('Removed language');
unset($item['options']['langcode']);
}
// @ TO DO: Refresh texts
//dsm($item);
//$original = $item['original_item'];
//$item['router_path'] = _menu_find_router_path($menu, $item['link_path']);
//i18nmenu_make_translatable($item);
}
?>