LocaleConfigSubscriber::updateLocaleStorage

protected LocaleConfigSubscriber::updateLocaleStorage(StorableConfigBase $config, $langcode, array $reference_config = array())

Update locale storage based on configuration translations.

Parameters

\Drupal\Core\Config\StorableConfigBase $config: Active configuration or configuration translation override.

string $langcode: The language code of $config.

array $reference_config: (Optional) Reference configuration to check against if $config was an override. This allows us to update locale keys for data not in the override but still in the active configuration.

File

core/modules/locale/src/LocaleConfigSubscriber.php, line 117

Class

LocaleConfigSubscriber
Updates strings translation when configuration translations change.

Namespace

Drupal\locale

Code

protected function updateLocaleStorage(StorableConfigBase $config, $langcode, array $reference_config = array()) {
  $name = $config->getName();
  if ($this->localeConfigManager->isSupported($name) && locale_is_translatable($langcode)) {
    $translatables = $this->localeConfigManager->getTranslatableDefaultConfig($name);
    $this->processTranslatableData($name, $config->get(), $translatables, $langcode, $reference_config);
  }
}
doc_Drupal
2016-10-29 09:23:58
Comments
Leave a Comment

Please login to continue.