Translates strings using Drupal's translation system.
This class is used by the Symfony validator to translate violation messages.
Hierarchy
- class \Drupal\Core\Validation\DrupalTranslator implements TranslatorInterface
File
- core/lib/Drupal/Core/Validation/DrupalTranslator.php, line 13
Namespace
Drupal\Core\Validation
Members
Name | Modifiers | Type | Description |
---|---|---|---|
DrupalTranslator::$locale | protected | property | The locale used for translating. |
DrupalTranslator::getLocale | public | function | Returns the current locale. Overrides TranslatorInterface::getLocale |
DrupalTranslator::getOptions | protected | function | Returns options suitable for use with t(). |
DrupalTranslator::processParameters | protected | function | Processes the parameters array for use with t(). |
DrupalTranslator::setLocale | public | function | Sets the current locale. Overrides TranslatorInterface::setLocale |
DrupalTranslator::trans | public | function | Translates the given message. Overrides TranslatorInterface::trans |
DrupalTranslator::transChoice | public | function | Translates the given choice message by choosing a translation according to a number. Overrides TranslatorInterface::transChoice |
Please login to continue.