if($name === 'document'){ // Translate document type
// The standard $translationComponent->translateDocuments can not be used here since the
// name may not be overridden. The field is edible and if the translation is
// shown in the edit field, there is a high chance of a user saving the translation as name
$translator = $this->get('translation')->getObjectTranslator('documents');