function locale_config_batch_set_config_langcodes
Same name in other branches
- 10 core/modules/locale/locale.bulk.inc \locale_config_batch_set_config_langcodes()
- 11.x 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 620
Code
function locale_config_batch_set_config_langcodes(&$context) {
Locale::config()->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.