function drupal_init_language

6.x bootstrap.inc drupal_init_language()

Choose a language for the current page, based on site and user preferences.

5 calls to drupal_init_language()
install_main in drupal-6.x/install.php
The Drupal installation happens in a series of steps. We begin by verifying that the current environment meets our minimum requirements. We then go on to verify that settings.php is properly configured. From there we connect to the configured database…
locale_uninstall in drupal-6.x/modules/locale/locale.install
Implementation of hook_uninstall().
update.php in drupal-6.x/update.php
Administrative page for handling updates from one Drupal version to another.
_db_error_page in drupal-6.x/includes/database.inc
Helper function to show fatal database errors.
_drupal_bootstrap in drupal-6.x/includes/bootstrap.inc

File

drupal-6.x/includes/bootstrap.inc, line 1239
Functions that need to be loaded on every Drupal request.

Code

function drupal_init_language() {
  global $language, $user;

  // Ensure the language is correctly returned, even without multilanguage support.
  // Useful for eg. XML/HTML 'lang' attributes.
  if (variable_get('language_count', 1) == 1) {
    $language = language_default();
  }
  else {
    include_once './includes/language.inc';
    $language = language_initialize();
  }
}