function locale_config_batch_set_config_langcodes

Same name and namespace in other branches
  1. 9 core/modules/locale/locale.bulk.inc \locale_config_batch_set_config_langcodes()
  2. 10 core/modules/locale/locale.bulk.inc \locale_config_batch_set_config_langcodes()

Implements callback_batch_operation().

Updates default configuration when new modules or themes are installed.

Parameters

array|\ArrayAccess $context: The batch context.

1 string reference to 'locale_config_batch_set_config_langcodes'
locale_config_batch_build in core/modules/locale/locale.bulk.inc
Creates a locale batch to refresh specific configuration.

File

core/modules/locale/locale.bulk.inc, line 614

Code

function locale_config_batch_set_config_langcodes(&$context) {
    \Drupal::service('locale.config_manager')->updateDefaultConfigLangcodes();
    $context['finished'] = 1;
    $context['message'] = t('Updated default configuration to %langcode', [
        '%langcode' => \Drupal::languageManager()->getDefaultLanguage()
            ->getId(),
    ]);
}

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