Problem/Motivation
If the site has an admin language preference option set in negotiation, users can set their admin language preference. However, even if that is set, only admin pages are affected. The admin toolbar is not. The admin toolbar displayed on non-admin pages will use the language of that page, not the admin language.
Proposed resolution
Negotiate an admin language for the toolbar and use that to render the menu.
Remaining tasks
Update release notes snippet and change record.
User interface changes
The admin toolbar will be in an admin-appropriate language.
API changes
See release notes snippet.
Release notes snippet
- \Drupal\user\ToolbarLinkBuilder
requires now a new parameter of type \Drupal\Core\Extension\ModuleHandlerInterface
. Custom modules extending ToolbarLinkBuilder
should adjust the code accordingly.
- New cache context: \Drupal\Core\Cache\Context\AccountAdminLanguageCacheContext
- New method setCurrentLanguage
introduced to LanguageManager
- New service: \Drupal\language\AdminLanguageRender