Checks whether an entity translation is accessible.
\Drupal\Core\Entity\EntityInterface $entity: The entity to be accessed.
string $langcode: The language of the translation to be accessed.
TRUE if the current user is allowed to view the translation.
function translation_entity_access(EntityInterface $entity, $langcode) {
return translation_entity_controller($entity
->entityType())
->getTranslationAccess($entity, $langcode);
}