How to render a paragraph field in Twig in correct language? I've got nodes with hero images. The hero images are a paragraph field with unlimited cardinality, each with an image and a translatable text. For design reasons I need to print the hero images in page.html.twig (using Twig Tweak for simplicity)

{{ drupal_field('field_banner_slide', 'node', node.id) }}

The hero slider has some options like timer, size,... which are other fields on the same host node, and pulled in during preprocess

function MYTHEME_base_preprocess_field(array &amp;$variables, $hook) {
  $parentEntity = $element['#object'];

  if ($parentEntity &amp;&amp; $variables['field_name'] == 'field_banner_slide') {
    // attach JS library
    // add HTML data attributes on this field based on other field values of same host node
    // ...and so on...
  }
}


All worked fine until my site went to the translator. My slider always returned the default lang. Next I tried setting the language in page.html.twig

{{ drupal_field('field_banner_slide', 'node', node.id, 'default', language.getId()) }}

This works for every other field - except Paragraphs. I've also tried the alternative

{{ node.field_banner_slide|view('default', language.getId()) }}

but still the same language problem. 

I've already checked the source code from Twig Tweak, it seems to correctly set the language 

  public function drupalField($field_name, $entity_type, $id = NULL, $view_mode = 'default', $langcode = NULL, $check_access = TRUE) {
    /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
    $entity = $id
      ? \Drupal::entityTypeManager()-&gt;getStorage($entity_type)-&gt;load($id)
      : \Drupal::routeMatch()-&gt;getParameter($entity_type);
    if ($entity &amp;&amp; (!$check_access || $entity-&gt;access('view'))) {
      $entity = \Drupal::service('entity.repository')
        -&gt;getTranslationFromContext($entity, $langcode);
      if (isset($entity-&gt;{$field_name})) {
        return $entity-&gt;{$field_name}-&gt;view($view_mode);
      }
    }
  }


I've been really digging here, but I can't find any single error. How do I get my correctly translated paragraphs?

PS: I don't want to use {{ drupal_entity('paragraph', my_field_banner_slide_target_ids, 'default', my_langcode) }}, because I also need the preprocessing from the host field.
The problem is that FieldItemInterface::view() has no language parameter. Furthermore paragraph fields are not translatable (only the subfields of the paragraph entity are translatable). So when rendering a paragraph field directly, without going through the host entity render stack, the language information is lost.

My solution was to force the translation in a preprocess function:

function MYTHEME_preprocess_field(array &amp;$variables, $hook) {

  // field_banner_slide is a paragraph field which needs
  // translation AND is rendered directly, e.g. by using Twig Tweak's
  // {{ drupal_field('field_banner_slide', 'node', node.id) }} in page.html.twig
  //
  // don't to this for "normal" rendering, e.g. when using
  // {{ content.field_banner_slide }} in node.html.twig

  if ($variables['field_name'] == 'field_banner_slide') {
    $lang = \Drupal::languageManager()-&gt;getCurrentLanguage()-&gt;getId();
    if(count($variables['items'])) {
      foreach($variables['items'] as $key =&gt; $item) {
        if ($item['content']['#paragraph']-&gt;hasTranslation($lang)) {
          $variables['items'][$key]['content']['#paragraph'] = $item['content']['#paragraph']-&gt;getTranslation($lang);
        }
      }
    }
  }
}


For a better technical explanation see issue #2753201 on d.o