You are here

function entity_translation_field_attach_insert in Entity Translation 7

Implements hook_field_attach_insert().

File

./entity_translation.module, line 1154

Code

function entity_translation_field_attach_insert($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);
    $handler
      ->initTranslations();
    $handler
      ->saveTranslations();
  }
}