function ConfigurableLanguageManager::setConfigOverrideLanguage

Same name in other branches
  1. 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setConfigOverrideLanguage()
  2. 8.9.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setConfigOverrideLanguage()
  3. 11.x 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

Overrides LanguageManager::setConfigOverrideLanguage

1 call to ConfigurableLanguageManager::setConfigOverrideLanguage()
ConfigurableLanguageManager::getNativeLanguages in core/modules/language/src/ConfigurableLanguageManager.php

File

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

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;
}

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