Reputation: 86
the website I work on was developped in french(FR) and I recently developped the multilingual aspect to translate the website in english(EN), for this, I used the translator bundle. Here are my configs files :
I also created a messages.en.xlf file with all my customs messages translated from french to english, and it works. Here is my problem : I want to translate all the default form errors.
My form with default locale: FR
My form with default locale EN
The language change has been detected and the tittle has been translated. But my error message is still the same. What can I do about it ? Do I have to manually translate all the displayed messages with some JS ? Thankx.
Upvotes: 1
Views: 1059
Reputation: 1788
Actually, you're doing right. It's juste because this is not a Symfony message, so you can't translate it.
This message come from your browser. Only displayed when an input has required
attribute.
Upvotes: 0
Reputation: 819
This validation and error messages come from HTML5 and language is based on your browser settings.
If you want to force english try adding this into your template:
<meta http-equiv="Content-Language" content="en">
Upvotes: 1