diff --git a/core/modules/language/src/ConfigurableLanguageManager.php b/core/modules/language/src/ConfigurableLanguageManager.php index 59d6d54..073f51c 100644 --- a/core/modules/language/src/ConfigurableLanguageManager.php +++ b/core/modules/language/src/ConfigurableLanguageManager.php @@ -99,7 +99,11 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl * * @var bool */ - protected $initializing = FALSE; + protected $initializing = [ + LanguageInterface::TYPE_INTERFACE => FALSE, + LanguageInterface::TYPE_CONTENT => FALSE, + LanguageInterface::TYPE_URL => FALSE, + ]; /** * {@inheritdoc} @@ -218,12 +222,12 @@ public function getCurrentLanguage($type = LanguageInterface::TYPE_INTERFACE) { $this->negotiatedLanguages[$type] = $this->getDefaultLanguage(); if ($this->negotiator && $this->isMultilingual()) { - if (!$this->initializing) { - $this->initializing = TRUE; + if (!$this->initializing[$type]) { + $this->initializing[$type] = TRUE; $negotiation = $this->negotiator->initializeType($type); $this->negotiatedLanguages[$type] = reset($negotiation); $this->negotiatedMethods[$type] = key($negotiation); - $this->initializing = FALSE; + $this->initializing[$type] = FALSE; } // If the current interface language needs to be retrieved during // initialization we return the system language. This way string