field_is_translatable
function field_is_translatable
field_is_translatable($entity_type, $field)
Checks whether a field has language support.
A field has language support enabled if its 'translatable' property is set to TRUE, and its entity type has at least one translation handler registered.
Parameters
$entity_type: The type of the entity the field is attached to.
$field: A field data structure.
Return value
TRUE if the field can be translated.
Related topics
File
- modules/field/field.multilingual.inc, line 175
- Functions implementing Field API multilingual support.
Code
function field_is_translatable($entity_type, $field) { return $field['translatable'] && field_has_translation_handler($entity_type); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!field.multilingual.inc/function/field_is_translatable/7.x