protected function LanguageManager::getLanguageDefault

Returns a language object representing the site's default language.

Return value

Drupal\Core\Language\Language A language object.

1 call to LanguageManager::getLanguageDefault()
LanguageManager::getLanguage in drupal/core/lib/Drupal/Core/Language/LanguageManager.php
Returns a language object for the given type.

File

drupal/core/lib/Drupal/Core/Language/LanguageManager.php, line 157
Contains \Drupal\Core\Language\LanguageManager.

Class

LanguageManager
Class responsible for initializing each language type.

Namespace

Drupal\Core\Language

Code

protected function getLanguageDefault() {
  $default_info = variable_get('language_default', array(
    'langcode' => 'en',
    'name' => 'English',
    'direction' => 0,
    'weight' => 0,
    'locked' => 0,
  ));
  return new Language($default_info + array(
    'default' => TRUE,
  ));
}