Problem/Motivation
On a multi language site the list of autocompleted nodes always show up in the current content language. Editing a Chinese site with admin UI language set to German, the list of nodes should be returned in the language they were matched.
Proposed resolution
The autocomplete callback needs to consider the language.
Steps to reproduce
- install drupal 8
- enabling content translation module
- adding language
- enable translation for articles (admin/config/regional/content-language)
- add an entity reference field to the article content type
- create an article
- translate article
- create a second article, with the langcode in the url (for example: af/node/add/article)
- type something in the autocomplete entity reference field
- save the second article
- translate the second article
- check whether the entity reference field of the second article has correct title in all the languages
- check the above on each of the corresponding edit pages too
Remaining tasks
Rewrite the entity query of DefaultSelection.
User interface changes
Language of node titles in entity reference field match the user input instead of current content language.
API changes
None