You are here

public function ConfigurableLanguageManager::setConfigOverrideLanguage in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setConfigOverrideLanguage()
  2. 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setConfigOverrideLanguage()

Sets the configuration override language.

Parameters

\Drupal\Core\Language\LanguageInterface $language: The language to override configuration with.

Return value

$this

File

core/modules/language/src/ConfigurableLanguageManager.php, line 434

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function setConfigOverrideLanguage(LanguageInterface $language = NULL) {
  $this->configFactoryOverride
    ->setLanguage($language);
  return $this;
}