function LanguageManager::getDefaultLanguage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getDefaultLanguage()
  2. 8.9.x core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getDefaultLanguage()
  3. 10 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getDefaultLanguage()

Overrides LanguageManagerInterface::getDefaultLanguage

5 calls to LanguageManager::getDefaultLanguage()
ConfigurableLanguageManager::getCurrentLanguage in core/modules/language/src/ConfigurableLanguageManager.php
Returns the current language for the given type.
ConfigurableLanguageManager::getLanguages in core/modules/language/src/ConfigurableLanguageManager.php
Returns a list of languages set up on the site.
LanguageManager::filterLanguages in core/lib/Drupal/Core/Language/LanguageManager.php
Filters the full list of languages based on the value of the flag.
LanguageManager::getCurrentLanguage in core/lib/Drupal/Core/Language/LanguageManager.php
Returns the current language for the given type.
LanguageManager::getLanguages in core/lib/Drupal/Core/Language/LanguageManager.php
Returns a list of languages set up on the site.

File

core/lib/Drupal/Core/Language/LanguageManager.php, line 121

Class

LanguageManager
Class responsible for providing language support on language-unaware sites.

Namespace

Drupal\Core\Language

Code

public function getDefaultLanguage() {
    return $this->defaultLanguage
        ->get();
}

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