You are here

function i18nmenu_locale_refresh in Internationalization 6

Refresh locale strings.

1 call to i18nmenu_locale_refresh()
i18nmenu_enable in i18nmenu/i18nmenu.install
Implementation of hook_enable().
1 string reference to 'i18nmenu_locale_refresh'
i18nmenu_locale in i18nmenu/i18nmenu.module
Implementation of hook_locale().

File

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

Code

function i18nmenu_locale_refresh() {

  // Rebuild menus to ensure all items are altered in i18nmenu_menu_link_alter().
  menu_rebuild();
  i18n_selection_mode('off');
  foreach (menu_get_menus() as $name => $title) {
    $tree = menu_tree_all_data($name);
    i18nmenu_localize_tree($tree, TRUE);
  }
  i18n_selection_mode('reset');
  return TRUE;

  // Meaning it completed with no issues
}