function _i18n_menu_link_description in Internationalization 7
Get localized menu description
1 call to _i18n_menu_link_description()
- _i18n_menu_link_localize in i18n_menu/
i18n_menu.module - Localize menu item title and description.
File
- i18n_menu/
i18n_menu.module, line 522 - Internationalization (i18n) submodule: Menu translation.
Code
function _i18n_menu_link_description($link, $langcode = NULL) {
if (!empty($link['options']['attributes']['title'])) {
$key = i18n_object_info('menu_link', 'key');
return i18n_string_translate(array(
'menu',
'item',
$link[$key],
'description',
), $link['options']['attributes']['title'], array(
'langcode' => $langcode,
'sanitize' => FALSE,
));
}
else {
return NULL;
}
}