Same name and namespace in other branches
  1. 8.9.x core/modules/locale/src/Locale.php \Drupal\locale\Locale::config()
  2. 9 core/modules/locale/src/Locale.php \Drupal\locale\Locale::config()

Returns the locale configuration manager service.

Use the locale config manager service for creating locale-wrapped typed configuration objects.

Return value

\Drupal\locale\LocaleConfigManager

See also

\Drupal\Core\TypedData\TypedDataManager::create()

10 calls to Locale::config()
LocaleConfigSubscriberTest::setUp in core/modules/locale/tests/src/Kernel/LocaleConfigSubscriberTest.php
LocaleConfigTranslationImportTest::testLocaleRemovalAndConfigOverrideDelete in core/modules/locale/tests/src/Functional/LocaleConfigTranslationImportTest.php
Tests removing a string from Locale deletes configuration translations.
locale_configurable_language_delete in core/modules/locale/locale.module
Implements hook_ENTITY_TYPE_delete() for 'configurable_language'.
locale_config_batch_refresh_name in core/modules/locale/locale.bulk.inc
Implements callback_batch_operation().
locale_config_batch_set_config_langcodes in core/modules/locale/locale.bulk.inc
Implements callback_batch_operation().

... See full list

File

core/modules/locale/src/Locale.php, line 20

Class

Locale
Static service container wrapper for locale.

Namespace

Drupal\locale

Code

public static function config() {
  return \Drupal::service('locale.config_manager');
}