Same name and namespace in other branches
  1. 7.x includes/bootstrap.inc \language_default()

Default language used on the site

Parameters

$property: Optional property of the language object to return

11 calls to language_default()
contact_mail_page_submit in modules/contact/contact.pages.inc
Process the site-wide contact page form submission.
drupal_init_language in includes/bootstrap.inc
Choose a language for the current page, based on site and user preferences.
language_initialize in includes/language.inc
Choose a language for the page, based on language negotiation settings.
locale_languages_edit_form_submit in includes/locale.inc
Process the language editing form submission.
locale_languages_overview_form in includes/locale.inc
User interface for the language overview screen.

... See full list

7 string references to 'language_default'
locale_add_language in includes/locale.inc
API function to add a language.
locale_languages_edit_form_submit in includes/locale.inc
Process the language editing form submission.
locale_languages_overview_form_submit in includes/locale.inc
Process language overview form submissions, updating existing languages.
locale_uninstall in modules/locale/locale.install
Implementation of hook_uninstall().
locale_update_6000 in modules/locale/locale.install
{locales_meta} table became {languages}.

... See full list

File

includes/bootstrap.inc, line 1348
Functions that need to be loaded on every Drupal request.

Code

function language_default($property = NULL) {
  $language = variable_get('language_default', (object) array(
    'language' => 'en',
    'name' => 'English',
    'native' => 'English',
    'direction' => 0,
    'enabled' => 1,
    'plurals' => 0,
    'formula' => '',
    'domain' => '',
    'prefix' => '',
    'weight' => 0,
    'javascript' => '',
  ));
  return $property ? $language->{$property} : $language;
}