You are here

function entity_translation_field_attach_update in Entity Translation 7

Implements hook_field_attach_update().

File

./entity_translation.module, line 1167

Code

function entity_translation_field_attach_update($entity_type, $entity) {

  // Store entity translation metadata only if the entity bundle is
  // translatable.
  if (entity_translation_enabled($entity_type, $entity)) {
    $handler = entity_translation_get_handler($entity_type, $entity, TRUE);
    $handler
      ->updateTranslations();
    $handler
      ->saveTranslations();
  }
}