function LanguageManagerInterface::getLanguage

Same name in other branches
  1. 9 core/lib/Drupal/Core/Language/LanguageManagerInterface.php \Drupal\Core\Language\LanguageManagerInterface::getLanguage()
  2. 10 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.

1 method overrides LanguageManagerInterface::getLanguage()
LanguageManager::getLanguage in core/lib/Drupal/Core/Language/LanguageManager.php
Returns a language object from the given language code.

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.