function field_is_translatable

7.x field.multilingual.inc 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

3 calls to field_is_translatable()
comment_submit in drupal-7.x/modules/comment/comment.module
Prepare a comment for submission.
field_available_languages in drupal-7.x/modules/field/field.multilingual.inc
Collects the available languages for the given entity type and field.
LocaleCommentLanguageFunctionalTest::setUp in drupal-7.x/modules/locale/locale.test
Sets up a Drupal site for running functional and integration tests.

File

drupal-7.x/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);
}