You are here

public function ConfigurableLanguageManager::init in Drupal 9

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

File

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

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function init() {
  if (!$this->initialized) {
    foreach ($this
      ->getDefinedLanguageTypes() as $type) {
      $this
        ->getCurrentLanguage($type);
    }
    $this->initialized = TRUE;
  }
}