You are here

function i18n_menu_menu_link_alter in Internationalization 7

Implements hook_menu_link_alter().

This function is invoked from menu_link_save() before default menu link options (menu_name, module, etc.. have been set)

File

i18n_menu/i18n_menu.module, line 197
Internationalization (i18n) submodule: Menu translation.

Code

function i18n_menu_menu_link_alter(&$item) {

  // We just make sure every link has a valid language property.
  if (!i18n_object_langcode($item)) {
    $item['language'] = LANGUAGE_NONE;
  }
}