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.

5 calls to language_default_locked_languages()
EntityAccessTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php
Sets up Drupal unit test environment.
EntityTranslationTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
Sets up Drupal unit test environment.
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
Prepares Drupal 8 language changes for the bootstrap if needed.

File

drupal/core/includes/bootstrap.inc, line 2554
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::LANGCODE_NOT_SPECIFIED] = new Language(array(
    'langcode' => Language::LANGCODE_NOT_SPECIFIED,
    'name' => t('Not specified'),
    'weight' => ++$weight,
  ) + $locked_language);
  $languages[Language::LANGCODE_NOT_APPLICABLE] = new Language(array(
    'langcode' => Language::LANGCODE_NOT_APPLICABLE,
    'name' => t('Not applicable'),
    'weight' => ++$weight,
  ) + $locked_language);
  return $languages;
}