View display plugin "entity reference" not using translation UPDATE: This bug was just fixed in Issue
  2174633 and
  Drupal v8.7.9 will no longer have this problem.


For some of my entity reference fields I'm using "Views: Filter by an entity reference views" as reference method. I've configured those views to use the current interface language for rendering (with fallback to default lang).



The interface language selection basically works (in other view blocks, or when previewing in /admin/structure/views), but it does not work when used as source for an entity reference field:


In my admin interface I'm using I've got a paragraph with an ER field using such a view as source. The paragraph always shows the title in default lang 
On the frontend I've got a webform select field using the same view as source. The select options are always rendering in default lang.
When using the default reference method I do get translated titles in both use cases.
As stated above, the correct language is used in preview on /admin/structure/views


How can I select the correct language for my view-filtered ER fields?

(Please note that I can not use the interface language as filter criteria, because this would disable the language fallback.)
Comparing TermSelection::getReferenceableEntities and ViewsSelection::getReferenceableEntities it seems like the Views entity reference selection plugin doesn't translate the entity before returning the entity labels. It should work with a core patch adding one line:

/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php:

public function getReferenceableEntities($match = NULL, $match_operator = 'CONTAINS', $limit = 0) {
  $display_name = $this-&gt;getConfiguration()['view']['display_name'];
  $arguments = $this-&gt;getConfiguration()['view']['arguments'];
  $result = [];
  if ($this-&gt;initializeView($match, $match_operator, $limit)) {
    // Get the results.
    $result = $this-&gt;view-&gt;executeDisplay($display_name, $arguments);
  }

  $return = [];
  if ($result) {
    foreach ($this-&gt;view-&gt;result as $row) {
      $entity = $row-&gt;_entity;
      // add this line to translate the entity
      $entity = \Drupal::service('entity.repository')-&gt;getTranslationFromContext($entity);
      $return[$entity-&gt;bundle()][$entity-&gt;id()] = $entity-&gt;label();
    }
  }
  return $return;
}


Edit:

This won't be necessary anymore, when https://www.drupal.org/project/drupal/issues/2174633 is fixed, then resolving the underlying problem, that the selection plugin ignores the views output.