function language_load

Loads a language object from the database.

Parameters

string $langcode: The language code.

Return value

Drupal\core\Language\Language | FALSE A fully-populated language object or FALSE.

41 calls to language_load()
BlockLanguageCacheTest::setUp in drupal/core/modules/block/lib/Drupal/block/Tests/BlockLanguageCacheTest.php
Sets up a Drupal site for running functional and integration tests.
BlockLanguageTest::testLanguageBlockVisibility in drupal/core/modules/block/lib/Drupal/block/Tests/BlockLanguageTest.php
Tests the visibility settings for the blocks based on language.
comment_tokens in drupal/core/modules/comment/comment.tokens.inc
Implements hook_tokens().
contact_mail in drupal/core/modules/contact/contact.module
Implements hook_mail().
DateFormatLocalizeResetForm::buildForm in drupal/core/modules/system/lib/Drupal/system/Form/DateFormatLocalizeResetForm.php

... See full list

File

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

Code

function language_load($langcode) {
  $languages = language_list(Language::STATE_ALL);
  return isset($languages[$langcode]) ? $languages[$langcode] : FALSE;
}