function i18n_menu_i18n_translate_path in Internationalization 7
Implements hook_i18n_translate_path()
File
- i18n_menu/
i18n_menu.module, line 100 - Internationalization (i18n) submodule: Menu translation.
Code
function i18n_menu_i18n_translate_path($path) {
$item = i18n_menu_link_load($path, i18n_langcode());
if ($item && ($set = i18n_translation_object('menu_link', $item))) {
$links = array();
foreach ($set
->get_translations() as $lang => $link) {
$links[$lang] = array(
'href' => $link['link_path'],
'title' => $link['link_title'],
'i18n_type' => 'menu_link',
'i18n_object' => $link,
);
}
return $links;
}
}