Symfony\Component\Validator\DefaultTranslator::trans
Interpolates the given message.
Parameters are replaced in the message in the same manner that {@link strtr()} uses. Example usage: $translator = new DefaultTranslator(); echo $translator->trans( 'This is a {{ var }}.', array('{{ var }}' => 'donkey') ); // -> This is a donkey.
Signature
public function trans(string
$id,
[array
$parameters = null,
[string
$domain = null,
[string
$locale = null]]] )
Parameters
$id
— string- The message id
$parameters
— array- An array of parameters for the message
$domain
— string- Ignored
$locale
— string- Ignored
Returns
- string
- The interpolated string