public function onContainerInitializeSubrequestFinished() { $this->
setLanguageOverrides();
} /**
* Sets the language for config overrides on the language manager.
*/
private function setLanguageOverrides() { $this->negotiator->
setCurrentUser($this->currentUser
);
if ($this->languageManager instanceof ConfigurableLanguageManagerInterface
) { $this->languageManager->
setNegotiator($this->negotiator
);
$this->languageManager->
setConfigOverrideLanguage($this->languageManager->
getCurrentLanguage());
} // After the language manager has initialized, set the default langcode for
// the string translations.
$langcode =
$this->languageManager->
getCurrentLanguage()->
getId();
$this->translation->
setDefaultLangcode($langcode);
} /**
* Registers the methods in this class that should be listeners.
*
* @return array
* An array of event listener definitions.
*/