function language_default

7.x bootstrap.inc language_default($property = NULL)
6.x bootstrap.inc language_default($property = NULL)
8.x bootstrap.inc language_default()

Default language used on the site

Parameters

$property: Optional property of the language object to return

17 calls to language_default()
contact_mail_page_submit in drupal/modules/contact/contact.pages.inc
Process the site-wide contact page form submission.
drupal_init_language in drupal/includes/bootstrap.inc
Choose a language for the current page, based on site and user preferences.
language_initialize in drupal/includes/language.inc
Choose a language for the page, based on language negotiation settings.
language_list in drupal/includes/bootstrap.inc
Get a list of languages set up indexed by the specified key
language_url_rewrite in drupal/includes/language.inc
Rewrite URL's with language based prefix. Parameters are the same as those of the url() function.

... See full list

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

... See full list

File

drupal/includes/bootstrap.inc, line 1311
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;
}