function _locale_refresh_configuration

Same name in other branches
  1. 9 core/modules/locale/locale.module \_locale_refresh_configuration()
  2. 8.9.x core/modules/locale/locale.module \_locale_refresh_configuration()
  3. 11.x core/modules/locale/locale.module \_locale_refresh_configuration()

Refreshes configuration after string translations have been updated.

Parameters

array $langcodes: Language codes for updated translations.

array $lids: List of string identifiers that have been updated / created.

1 call to _locale_refresh_configuration()
TranslateEditForm::submitForm in core/modules/locale/src/Form/TranslateEditForm.php
Form submission handler.

File

core/modules/locale/locale.module, line 1054

Code

function _locale_refresh_configuration(array $langcodes, array $lids) {
    $locale_config_manager = \Drupal::service('locale.config_manager');
    if ($lids && $langcodes && ($names = $locale_config_manager->getStringNames($lids))) {
        $locale_config_manager->updateConfigTranslations($names, $langcodes);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.