LanguageServiceProvider::getDefaultLanguageValues

protected LanguageServiceProvider::getDefaultLanguageValues()

Gets the default language values.

Return value

array|bool Returns the default language values for the language configured in system.site:default_langcode if the corresponding configuration entity exists, otherwise FALSE.

File

core/modules/language/src/LanguageServiceProvider.php, line 94

Class

LanguageServiceProvider
Overrides the language_manager service to point to language's module one.

Namespace

Drupal\language

Code

protected function getDefaultLanguageValues() {
  $config_storage = BootstrapConfigStorageFactory::get();
  $system = $config_storage->read('system.site');
  $default_language = $config_storage->read(static::CONFIG_PREFIX . $system['default_langcode']);
  if (is_array($default_language)) {
    return $default_language;
  }
  return FALSE;
}
doc_Drupal
2016-10-29 09:22:59
Comments
Leave a Comment

Please login to continue.