You are here

function _i18n_menu_link_is_localizable in Internationalization 7

Check whether this link should be localized by i18n_menu.

Parameters

array $link: Menu link array.

bool $check_strings: Whether to check if the link has actually localizable strings. Since this is a more expensive operation, it will be just checked when editing menu items.

Return value

boolean Returns TRUE if link is localizable.

4 calls to _i18n_menu_link_is_localizable()
i18n_menu_localize_tree in i18n_menu/i18n_menu.module
Localize menu tree.
i18n_menu_menu_link_update in i18n_menu/i18n_menu.module
Implements hook_menu_link_update().
i18n_menu_translated_menu_link_alter in i18n_menu/i18n_menu.module
Implements hook_translated_menu_link_alter().
_i18n_menu_link_check_alter in i18n_menu/i18n_menu.module
Check whether this menu item should be marked for altering.

File

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

Code

function _i18n_menu_link_is_localizable($link, $check_strings = FALSE) {
  return !empty($link['customized']) && !i18n_object_langcode($link) && i18n_menu_mode($link['menu_name'], I18N_MODE_LOCALIZE) && (!$check_strings || _i18n_menu_link_localizable_properties($link));
}