public function LanguageManager::getLanguage in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getLanguage()
- 9 core/lib/Drupal/Core/Language/LanguageManager.php \Drupal\Core\Language\LanguageManager::getLanguage()
File
- core/
lib/ Drupal/ Core/ Language/ LanguageManager.php, line 150
Class
- LanguageManager
- Class responsible for providing language support on language-unaware sites.
Namespace
Drupal\Core\LanguageCode
public function getLanguage($langcode) {
$languages = $this
->getLanguages(LanguageInterface::STATE_ALL);
return $languages[$langcode] ?? NULL;
}