function drupal_language_initialize

Initializes all the defined language types.

7 calls to drupal_language_initialize()
authorize.php in drupal/authorize.php
Administrative script for running authorized file operations.
drupal_bootstrap in drupal/includes/
Ensures Drupal is bootstrapped to the specified phase.
install_begin_request in drupal/includes/
Begins an installation request, modifying the installation state as needed.
LocaleUninstallFunctionalTest::testUninstallProcess in drupal/modules/locale/locale.test
Check if the values of the Locale variables are correct after uninstall.
locale_uninstall in drupal/modules/locale/locale.install
Implements hook_uninstall().

... See full list


drupal/includes/, line 2949
Functions that need to be loaded on every Drupal request.


function drupal_language_initialize() {
  $types = language_types();

  // Ensure the language is correctly returned, even without multilanguage
  // support. Also make sure we have a $language fallback, in case a language
  // negotiation callback needs to do a full bootstrap.
  // Useful for eg. XML/HTML 'lang' attributes.
  $default = language_default();
  foreach ($types as $type) {
    $GLOBALS[$type] = $default;
  if (drupal_multilingual()) {
    include_once DRUPAL_ROOT . '/includes/';
    foreach ($types as $type) {
      $GLOBALS[$type] = language_initialize($type);

    // Allow modules to react on language system initialization in multilingual
    // environments.