diff --git a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index 4c93bca..a443ae0 100644 --- a/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -250,10 +250,15 @@ public function buildMultiple(array $entities) { $items = $grouped_items[$id]; /** @var \Drupal\Core\Access\AccessResultInterface $field_access */ $field_access = $items->access('view', NULL, TRUE); - // Display fields for untranslatable entities in the current content - // language. - $view_langcode = $entity->language()->getId(); - if ($entity instanceof TranslatableInterface && !$entity->isTranslatable()) { + // The language of the field values to display is already determined + // in the incoming $entity. The formatter should build its output of + // those values using: + // - the entity language if the entity is translatable, + // - the current "content language" otherwise. + if ($entity instanceof TranslatableInterface && $entity->isTranslatable()) { + $view_langcode = $entity->language()->getId(); + } + else { $view_langcode = NULL; } $build_list[$id][$name] = $field_access->isAllowed() ? $formatter->view($items, $view_langcode) : [];