Implements hook_entity_info_alter().
function entity_test_entity_info_alter(&$info) {
// Optionally specify a translation handler for testing translations.
if (Drupal::state()
->get('entity_test.translation')) {
foreach (entity_test_entity_types() as $entity_type) {
$info[$entity_type]['translation'][$entity_type] = TRUE;
}
}
}