2 * Implements hook_entity_operation_alter().
4 function {{ machine_name }}_entity_operation_alter(array &$operations, \Drupal\Core\Entity\EntityInterface $entity) {
5 // Alter the title and weight.
6 $operations['translate']['title'] = t('Translate @entity_type', [
7 '@entity_type' => $entity->getEntityTypeId(),
9 $operations['translate']['weight'] = 99;