class DrupalTranslator

Translates strings using Drupal's translation system.

This class is used by the Symfony validator to translate violation messages.

Hierarchy

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

© 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!Validation!DrupalTranslator.php/class/DrupalTranslator/8.1.x