Programatically render field in specific language while leveraging core content language detection
You need get Translation of entity. function entity load just load default language, not load current language. Try this:

public function xmlController($entityType, $entityId, $fieldName, $displayName) {
    $entity = $this-&gt;entityManager-&gt;getStorage($entityType)-&gt;load($entityId);

    $entity_es = $entity-&gt;getTranslation('es');

    $field = $entity-&gt;{$fieldName}-&gt;view($displayName);
    new Response() object ...
  }


and you need detect language to auto. Code above just example.