You are here

function i18nmenu_translated_menu_link_alter in Internationalization 6

Implementation of hook_translated_menu_link_alter().

Translate menu links on the fly.

See also

i18nmenu_menu_link_alter()

File

i18nmenu/i18nmenu.module, line 72
Internationalization (i18n) submodule: Menu translation.

Code

function i18nmenu_translated_menu_link_alter(&$item, $map) {
  if ($item['module'] == 'menu') {
    $item['title'] = _i18nmenu_get_item_title($item);
    $item['localized_options']['attributes']['title'] = _i18nmenu_get_item_description($item);
  }
}