public function TranslatorInterface::trans

Translates the given message.

@api

Parameters

string $id The message id (may also be an object that can be cast to string):

array $parameters An array of parameters for the message:

string $domain The domain for the message:

string $locale The locale:

Return value

string The translated string

2 methods override TranslatorInterface::trans()
DefaultTranslator::trans in drupal/core/vendor/symfony/validator/Symfony/Component/Validator/DefaultTranslator.php
Interpolates the given message.
DrupalTranslator::trans in drupal/core/lib/Drupal/Core/Validation/DrupalTranslator.php
Implements \Symfony\Component\Translation\TranslatorInterface::trans().

File

drupal/core/vendor/symfony/translation/Symfony/Component/Translation/TranslatorInterface.php, line 35

Class

TranslatorInterface
TranslatorInterface.

Namespace

Symfony\Component\Translation

Code

public function trans($id, array $parameters = array(), $domain = null, $locale = null);