Problem/Motivation

Child of #3615902: Plan: Translation support. The builder decides which translation it edits from the URL language: Instance::ensureCurrentTranslation() and DisplayBuildablePluginBase::getTranslationLangcode() read LanguageInterface::TYPE_URL, not core's configurable negotiation. pdureau challenged it in #3555110: Symmetric translation #63.

Three other checks read the interface language: the 404 guard of IntegrationControllerBase, EntityViewOverride::checkAccess() and LanguageSwitcher. They agree while the interface language follows the URL prefix, and differ when a site negotiates it another way: session, user preference, browser.

Proposed resolution

Decide one rule, and apply it to the five places:

  • The URL language, as today: the builder edits the translation of the URL, whatever the admin interface is in. The three checks follow.
  • Or core's negotiation, with a documented setting for sites whose interface language is not the edited one.

Kernel tests for a site negotiating the interface language by session.

Remaining tasks

  • Decide the rule.

User interface changes

Depends on the rule.

API changes

None expected. #3624396: Plan: Harden InstanceInterface, IslandInterface and DisplayBuildableInterface as public API before RC1 child 3a only fixes the contract of ensureCurrentTranslation().

Data model changes

None.

Comments

mogtofu33 created an issue.