diff --git a/core/modules/language/lib/Drupal/language/Entity/Language.php b/core/modules/language/lib/Drupal/language/Entity/Language.php index 0423657..6f3f6ac 100644 --- a/core/modules/language/lib/Drupal/language/Entity/Language.php +++ b/core/modules/language/lib/Drupal/language/Entity/Language.php @@ -95,9 +95,12 @@ class Language extends ConfigEntityBase implements LanguageInterface { /** * Used to detect when the site becomes multilingual. * + * This property is not saved to the language entity, but is needed for + * detecting when to rebuild the services. + * * @var bool */ - protected $multilingual; + protected $preSaveMultilingual; /** * Sets the default flag on the language entity. @@ -149,7 +152,7 @@ public function postSave(EntityStorageInterface $storage, $update = TRUE) { // If after adding this language the site will become multilingual, we need to // rebuild language services. - if (!$this->multilingual && !$update) { + if (!$this->preSaveMultilingual && !$update) { ConfigurableLanguageManager::rebuildServices(); } }