function i18n_node_type_enabled in Internationalization 7
Check whether this is a language enabled node type
Parameters
$type: Node, node type object, or node type name
6 calls to i18n_node_type_enabled()
- i18n_node_field_extra_fields in i18n_node/
i18n_node.module - Implements hook_field_extra_fields().
- i18n_node_form_node_type_form_alter in i18n_node/
i18n_node.module - Implements hook_form_FORM_ID_alter().
- i18n_node_i18n_context_language in i18n_node/
i18n_node.module - Implements hook_i18n_context_language().
- i18n_node_node_prepare in i18n_node/
i18n_node.module - Implements hook_node_prepare().
- i18n_node_node_view in i18n_node/
i18n_node.module - Implements hook_node_view()
File
- i18n_node/
i18n_node.module, line 599 - Internationalization (i18n) module - Node type handling
Code
function i18n_node_type_enabled($type) {
$type = is_object($type) ? $type->type : $type;
$mode = variable_get('language_content_type_' . $type, 0);
return $mode == 1 || $mode == 2;
// 2 == TRANSLATION_ENABLED
}