function _i18n_book_navigation_translate in Book translation 6
Translate the menu link
6 calls to _i18n_book_navigation_translate()
- _i18n_book_navigation_block in ./
i18n_book_navigation.module - Creates the block array. Assembles the navigation for the "current" book outline and translates the links to the desired language.
- _i18n_book_navigation_book_children in ./
i18n_book_navigation.module - Create a menu tree with only the direct child elements
- _i18n_book_navigation_create_menu_tree in ./
i18n_book_navigation.module - Get the active trail in the menu tree
- _i18n_book_navigation_next in ./
i18n_book_navigation.module - Get the next book page
- _i18n_book_navigation_prev in ./
i18n_book_navigation.module - Get the previous book page
File
- ./
i18n_book_navigation.module, line 422
Code
function _i18n_book_navigation_translate(&$array) {
if ($tnode = _i18n_book_navigation_get_translated_node($array['link_path'])) {
$array['title'] = $array['link_title'] = $tnode->title;
$array['access'] = TRUE;
$array['href'] = $array['link_path'] = 'node/' . $tnode->nid;
$array['localized_options'] = array();
}
else {
$array = array();
}
}