protected function StaticTranslation::getLanguage
protected StaticTranslation::getLanguage($langcode)
Retrieves translations for a given language.
Parameters
string $langcode: The langcode of the language.
Return value
array A multidimensional array of translations, indexed by the context the source string belongs to. The second level is using original strings as keys. An empty array will be returned when no translations are available.
File
- core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 63
Class
- StaticTranslation
- String translator with a static cache for translations.
Namespace
Drupal\Core\StringTranslation\TranslatorCode
protected function getLanguage($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(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!StringTranslation!Translator!StaticTranslation.php/function/StaticTranslation::getLanguage/8.1.x