ConfigurableLanguage::getDefaultLangcode

protected static ConfigurableLanguage::getDefaultLangcode()

Gets the default langcode.

Return value

string The current default langcode.

File

core/modules/language/src/Entity/ConfigurableLanguage.php, line 184

Class

ConfigurableLanguage
Defines the ConfigurableLanguage entity.

Namespace

Drupal\language\Entity

Code

protected static function getDefaultLangcode() {
  $language = \Drupal::service('language.default')->get();
  return $language->getId();
}
doc_Drupal
2016-10-29 08:55:06
Comments
Leave a Comment

Please login to continue.