public LocaleConfigSubscriber::onOverrideChange(LanguageConfigOverrideCrudEvent $event)
Updates the locale strings when a configuration override is saved/deleted.
Parameters
\Drupal\language\Config\LanguageConfigOverrideCrudEvent $event: The language configuration event.
File
- core/modules/locale/src/LocaleConfigSubscriber.php, line 94
Class
- LocaleConfigSubscriber
- Updates strings translation when configuration translations change.
Namespace
Drupal\locale
Code
public function onOverrideChange(LanguageConfigOverrideCrudEvent $event) { // Only attempt to feed back configuration override changes to locale if // the update itself was not initiated by locale data changes. if (!drupal_installation_attempted() && !$this->localeConfigManager->isUpdatingTranslationsFromLocale()) { $translation_config = $event->getLanguageConfigOverride(); $langcode = $translation_config->getLangcode(); $reference_config = $this->configFactory->getEditable($translation_config->getName())->get(); $this->updateLocaleStorage($translation_config, $langcode, $reference_config); } }
Please login to continue.