interface TranslatorInterface
Defines an interface used in validation.
This extends the interface used by the Symfony validator in order to indicate that the Drupal code is actually independent from the Symfony translation component.
Hierarchy
- interface \Symfony\Component\Translation\TranslatorInterface
- interface \Drupal\Core\Validation\TranslatorInterface
See also
https://github.com/symfony/symfony/pull/6189
https://github.com/symfony/symfony/issues/15714
File
- core/lib/Drupal/Core/Validation/TranslatorInterface.php, line 17
Namespace
Drupal\Core\ValidationMembers
Name | Modifiers | Type | Description |
---|---|---|---|
TranslatorInterface::getLocale | public | function | Returns the current locale. |
TranslatorInterface::setLocale | public | function | Sets the current locale. |
TranslatorInterface::trans | public | function | Translates the given message. |
TranslatorInterface::transChoice | public | function | Translates the given choice message by choosing a translation according to a number. |
© 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!TranslatorInterface.php/interface/TranslatorInterface/8.1.x