symfony/symfony — Issue #2474: Unable to translate validation.yml messages with parameters
Author: bhelm
Created: 2011-10-25 17:43:43+00:00
State: open

Translating messages from the app/config/validation.yml works well, as far as you dont need to pass parameters with it.
see this translation file (Resources/translations/validation.en.yml:):
```
email: The address %email% is invalid
```
from the controller, i can do this to get the message translated, which works well (if i put the translation into messages.en.yml of course)
```
$this->get('translator')->trans('email',array('%email%'=>'foo@foo.com'));
```
but if i try to do that from the validation.yml, i at least dont know what syntax to use, i were unable to find something about it on the documentation.
```
- Email: { message: "error.form.invalid.email", checkMX: true }
```
how can i add the %email%: {{ value }} replacement there?