2 * Implements hook_field_attach_prepare_translation_alter().
4 function {{ machine_name }}_field_attach_prepare_translation_alter(&$entity, $context) {
5 if ($context['entity_type'] == 'custom_entity_type') {
6 $entity->custom_field = $context['source_entity']->custom_field;