public function TranslatorInterface::trans in Plug 7
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|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
5 methods override TranslatorInterface::trans()
- DataCollectorTranslator::trans in lib/
Symfony/ translation/ DataCollectorTranslator.php - Translates the given message.
- DefaultTranslator::trans in lib/
Symfony/ validator/ Symfony/ Component/ Validator/ DefaultTranslator.php - Interpolates the given message.
- IdentityTranslator::trans in lib/
Symfony/ translation/ IdentityTranslator.php - @api
- LoggingTranslator::trans in lib/
Symfony/ translation/ LoggingTranslator.php - Translates the given message.
- Translator::trans in lib/
Symfony/ translation/ Translator.php - @api
File
- lib/
Symfony/ translation/ TranslatorInterface.php, line 37
Class
- TranslatorInterface
- TranslatorInterface.
Namespace
Symfony\Component\TranslationCode
public function trans($id, array $parameters = array(), $domain = null, $locale = null);