You are here

function _i18nmenu_get_item_title in Internationalization 6

Optionally insert/update and return a localized menu item title.

3 calls to _i18nmenu_get_item_title()
i18nmenu_localize_tree in i18nmenu/i18nmenu.module
Localize menu tree.
i18nmenu_translated_menu_link_alter in i18nmenu/i18nmenu.module
Implementation of hook_translated_menu_link_alter().
_i18nmenu_update_item in i18nmenu/i18nmenu.module
Update the translation data for a menu item that has been inserted or updated.

File

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

Code

function _i18nmenu_get_item_title($link, $update = FALSE, $langcode = NULL) {
  $key = 'menu:item:' . $link['mlid'] . ':title';
  if ($update) {
    i18nstrings_update($key, $link['link_title']);
  }
  return i18nstrings($key, $link['link_title'], $langcode);
}