String translator with a static cache for translations.
This is a high performance way to provide a handful of string replacements.
Hierarchy
- class \Drupal\Core\StringTranslation\Translator\StaticTranslation implements TranslatorInterface
File
- core/lib/Drupal/Core/StringTranslation/Translator/StaticTranslation.php, line 10
Namespace
Drupal\Core\StringTranslation\Translator
Members
Name | Modifiers | Type | Description |
---|---|---|---|
StaticTranslation::$translations | protected | property | String translations |
StaticTranslation::getLanguage | protected | function | Retrieves translations for a given language. |
StaticTranslation::getStringTranslation | public | function | Retrieves English string to given language. Overrides TranslatorInterface::getStringTranslation |
StaticTranslation::reset | public | function | Resets translation cache. Overrides TranslatorInterface::reset |
StaticTranslation::__construct | public | function | Constructs a translator from an array of translations. |
Please login to continue.