public function StaticTranslation::__construct
public StaticTranslation::__construct($translations = array())
Constructs a translator from an array of translations.
Parameters
array $translations: Array of override strings indexed by language and context
File
- core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 26
Class
- StaticTranslation
- String translator with a static cache for translations.
Namespace
Drupal\Core\StringTranslation\TranslatorCode
public function __construct($translations = array()) { $this->translations = $translations; }
© 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::__construct/8.1.x