function i18n_entity_translation_enabled in Internationalization 7
Checks if an entity translation is enabled for the given entity type.
Parameters
$entity_type:
File
- ./
i18n.module, line 627 - Internationalization (i18n) module.
Code
function i18n_entity_translation_enabled($entity_type) {
$cache =& drupal_static(__FUNCTION__);
if (!isset($cache[$entity_type])) {
// Check if the entity_translation module exists and if so if the given
// entity type is handled.
$cache[$entity_type] = module_exists('entity_translation') && entity_translation_enabled($entity_type);
}
return $cache[$entity_type];
}