You are here

interface TranslatorInterface in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/translation/TranslatorInterface.php \Symfony\Component\Translation\TranslatorInterface
  2. 8.0 vendor/symfony/css-selector/XPath/TranslatorInterface.php \Symfony\Component\CssSelector\XPath\TranslatorInterface
  3. 8.0 core/lib/Drupal/Core/Validation/TranslatorInterface.php \Drupal\Core\Validation\TranslatorInterface
  4. 8.0 core/lib/Drupal/Core/StringTranslation/Translator/TranslatorInterface.php \Drupal\Core\StringTranslation\Translator\TranslatorInterface
Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Validation/TranslatorInterface.php \Drupal\Core\Validation\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

Expanded class hierarchy of TranslatorInterface

All classes that implement TranslatorInterface

See also

https://github.com/symfony/symfony/pull/6189

https://github.com/symfony/symfony/issues/15714

3 files declare their use of TranslatorInterface
ConstraintViolationBuilder.php in core/lib/Drupal/Core/TypedData/Validation/ConstraintViolationBuilder.php
Contains \Drupal\Core\TypedData\Validation\ConstraintViolationBuilder.
ExecutionContext.php in core/lib/Drupal/Core/TypedData/Validation/ExecutionContext.php
Contains \Drupal\Core\TypedData\Validation\ExecutionContext.
ExecutionContextFactory.php in core/lib/Drupal/Core/TypedData/Validation/ExecutionContextFactory.php
Contains \Drupal\Core\TypedData\Validation\ExecutionContextFactory.

File

core/lib/Drupal/Core/Validation/TranslatorInterface.php, line 22
Contains \Drupal\Core\Validation\TranslatorInterface.

Namespace

Drupal\Core\Validation
View source
interface TranslatorInterface extends SymfonyTranslatorInterface {

}

Members

Namesort descending Modifiers Type Description Overrides
TranslatorInterface::getLocale public function Returns the current locale. 6
TranslatorInterface::setLocale public function Sets the current locale. 6
TranslatorInterface::trans public function Translates the given message. 6
TranslatorInterface::transChoice public function Translates the given choice message by choosing a translation according to a number. 6