function i18nmenu_preprocess_page in Internationalization 6
Replace standard primary and secondary links.
File
- i18nmenu/
i18nmenu.module, line 186 - Internationalization (i18n) submodule: Menu translation.
Code
function i18nmenu_preprocess_page(&$vars) {
if (theme_get_setting('toggle_primary_links')) {
$vars['primary_links'] = i18nmenu_menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'));
}
// If the secondary menu source is set as the primary menu, we display the
// second level of the primary menu.
if (theme_get_setting('toggle_secondary_links')) {
if (variable_get('menu_secondary_links_source', 'secondary-links') == variable_get('menu_primary_links_source', 'primary-links')) {
$vars['secondary_links'] = i18nmenu_menu_navigation_links(variable_get('menu_primary_links_source', 'primary-links'), 1);
}
else {
$vars['secondary_links'] = i18nmenu_menu_navigation_links(variable_get('menu_secondary_links_source', 'secondary-links'), 0);
}
}
}