public function LanguageNegotiationUI::getLangcode in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI::getLangcode()
- 9 core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI::getLangcode()
File
- core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationUI.php, line 29
Class
- LanguageNegotiationUI
- Identifies the language from the interface text language selected for page.
Namespace
Drupal\language\Plugin\LanguageNegotiationCode
public function getLangcode(Request $request = NULL) {
return $this->languageManager ? $this->languageManager
->getCurrentLanguage()
->getId() : NULL;
}