protected static function ConfigurableLanguage::getDefaultLangcode in Drupal 8
Same name and namespace in other branches
- 9 core/modules/language/src/Entity/ConfigurableLanguage.php \Drupal\language\Entity\ConfigurableLanguage::getDefaultLangcode()
Gets the default langcode.
Return value
string The current default langcode.
2 calls to ConfigurableLanguage::getDefaultLangcode()
- ConfigurableLanguage::isDefault in core/
modules/ language/ src/ Entity/ ConfigurableLanguage.php - Returns whether this language is the default language.
- ConfigurableLanguage::preDelete in core/
modules/ language/ src/ Entity/ ConfigurableLanguage.php
File
- core/
modules/ language/ src/ Entity/ ConfigurableLanguage.php, line 212
Class
- ConfigurableLanguage
- Defines the ConfigurableLanguage entity.
Namespace
Drupal\language\EntityCode
protected static function getDefaultLangcode() {
$language = \Drupal::service('language.default')
->get();
return $language
->getId();
}