You are here

function _locale_refresh_configuration in Drupal 8

Same name and namespace in other branches
  1. 9 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 1092
Enables the translation of the user interface to languages other than English.

Code

function _locale_refresh_configuration(array $langcodes, array $lids) {
  if ($lids && $langcodes && ($names = Locale::config()
    ->getStringNames($lids))) {
    Locale::config()
      ->updateConfigTranslations($names, $langcodes);
  }
}