You are here

function i18n_menu_node_supported_type in Internationalization 7

Check whether a node type has multilingual support (but not entity translation).

3 calls to i18n_menu_node_supported_type()
i18n_menu_form_menu_edit_item_alter in i18n_menu/i18n_menu.module
Implements hook_form_FORM_ID_alter().
i18n_menu_form_node_form_alter in i18n_menu/i18n_menu.module
Implements hook_form_node_form_alter().
i18n_menu_node_presave in i18n_menu/i18n_menu.module
Implements hook_node_presave()

File

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

Code

function i18n_menu_node_supported_type($type) {
  $supported =& drupal_static(__FUNCTION__);
  if (!isset($supported[$type])) {
    $mode = variable_get('language_content_type_' . $type, 0);
    $supported[$type] = $mode == 1 || $mode == 2;

    // 2 == TRANSLATION_ENABLED
  }
  return $supported[$type];
}