protected function StaticTranslation::loadLanguage

Add translations for new language.

Parameters

string $langcode: The langcode of the language.

1 call to StaticTranslation::loadLanguage()
StaticTranslation::getStringTranslation in drupal/core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php
Retrieves English string to given language.
2 methods override StaticTranslation::loadLanguage()
CustomStrings::loadLanguage in drupal/core/lib/Drupal/Core/StringTranslation/Translator/CustomStrings.php
Add translations for new language.
FileTranslation::loadLanguage in drupal/core/lib/Drupal/Core/StringTranslation/Translator/FileTranslation.php
Add translations for new language.

File

drupal/core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 63
Contains \Drupal\Core\StringTranslation\Translator\StaticTranslation.

Class

StaticTranslation
String translator with a static cache for translations.

Namespace

Drupal\Core\StringTranslation\Translator

Code

protected function loadLanguage($langcode) {

  // This class is usually a base class but we do not declare as abstract
  // because it can be used on its own, by passing a simple array on the
  // constructor. This can be useful while testing, but it does not support
  // loading specific languages. All available languages should be passed
  // in the constructor array.
  return array();
}