function LanguageManagerInterface::getLanguage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Language/LanguageManagerInterface.php \Drupal\Core\Language\LanguageManagerInterface::getLanguage()
  2. 8.9.x core/lib/Drupal/Core/Language/LanguageManagerInterface.php \Drupal\Core\Language\LanguageManagerInterface::getLanguage()
  3. 11.x core/lib/Drupal/Core/Language/LanguageManagerInterface.php \Drupal\Core\Language\LanguageManagerInterface::getLanguage()

Returns a language object from the given language code.

Parameters

string $langcode: The language code.

Return value

\Drupal\Core\Language\LanguageInterface|null A fully-populated language object or NULL.

File

core/lib/Drupal/Core/Language/LanguageManagerInterface.php, line 105

Class

LanguageManagerInterface
Common interface for the language manager service.

Namespace

Drupal\Core\Language

Code

public function getLanguage($langcode);

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