public function LanguageManager::getDefaultLanguage in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getDefaultLanguage()
Returns a language object representing the site's default language.
Return value
\Drupal\Core\Language\LanguageInterface A language object.
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 116
Class
- LanguageManager
- Class responsible for providing language support on language-unaware sites.
Namespace
Drupal\Core\LanguageCode
public function getDefaultLanguage() {
return $this->defaultLanguage
->get();
}