You are here

function _i18n_menu_link_title in Internationalization 7

Get localized menu title

2 calls to _i18n_menu_link_title()
i18n_menu_form_menu_overview_form_alter in i18n_menu/i18n_menu.module
Implements hook_form_FORM_ID_alter(). FORM_ID = menu-overview-form. Add a "translate" link in operations column for each menu item.
_i18n_menu_link_localize in i18n_menu/i18n_menu.module
Localize menu item title and description.

File

i18n_menu/i18n_menu.module, line 490
Internationalization (i18n) submodule: Menu translation.

Code

function _i18n_menu_link_title($link, $langcode = NULL) {
  $key = i18n_object_info('menu_link', 'key');
  return i18n_string_translate(array(
    'menu',
    'item',
    $link[$key],
    'title',
  ), $link['link_title'], array(
    'langcode' => $langcode,
    'sanitize' => FALSE,
  ));
}