You are here

public function IdentityTranslator::trans in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/IdentityTranslator.php \Symfony\Component\Translation\IdentityTranslator::trans()

Translates the given message.

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|null $domain The domain for the message or null to use the default:

string|null $locale The locale or null to use the default:

Return value

string The translated string

Throws

\InvalidArgumentException If the locale contains invalid characters

Overrides TranslatorInterface::trans

File

vendor/symfony/translation/IdentityTranslator.php, line 53

Class

IdentityTranslator
IdentityTranslator does not translate anything.

Namespace

Symfony\Component\Translation

Code

public function trans($id, array $parameters = array(), $domain = null, $locale = null) {
  return strtr((string) $id, $parameters);
}