function language_default_locked_languages

Returns a list of the default locked languages.

Parameters

int $weight: An integer value that is used as the start value for the weights of the locked languages.

Return value

array An array of language objects.

3 calls to language_default_locked_languages()
language_install in drupal/core/modules/language/language.install
Implements hook_install().
language_list in drupal/core/includes/bootstrap.inc
Returns a list of languages set up on the site.
update_prepare_d8_language in drupal/core/includes/update.inc
Prepare Drupal 8 language changes for the bootstrap if needed.

File

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

Code

function language_default_locked_languages($weight = 0) {
  $locked_language = array(
    'default' => FALSE,
    'locked' => TRUE,
    'enabled' => TRUE,
  );
  $languages = array();
  $languages[LANGUAGE_NOT_SPECIFIED] = new Language(array(
    'langcode' => LANGUAGE_NOT_SPECIFIED,
    'name' => t('Not specified'),
    'weight' => ++$weight,
  ) + $locked_language);
  $languages[LANGUAGE_NOT_APPLICABLE] = new Language(array(
    'langcode' => LANGUAGE_NOT_APPLICABLE,
    'name' => t('Not applicable'),
    'weight' => ++$weight,
  ) + $locked_language);
  $languages[LANGUAGE_MULTIPLE] = new Language(array(
    'langcode' => LANGUAGE_MULTIPLE,
    'name' => t('Multiple'),
    'weight' => ++$weight,
  ) + $locked_language);
  return $languages;
}