unairoldan
unairoldan

Reputation: 2863

Translate form_error() in Symfony2

I am trying to translate the form_errors in a Symfony2 generated Forms, but I do not know how to do it. I have tried it to do iqual to the other texts in the application, putting a generic label with the transations in my message.locale.yml, but it does not work.

Also I have searched info to overwrite or "theming" the form_errors label, but in the Symfony2 definitions this field is not defined.

Does anyone know how to translate error message of form in Symfony2?

Upvotes: 1

Views: 2428

Answers (2)

1ed
1ed

Reputation: 3668

You should translate validator messages because those messages comes from there. E.g. see this or this.

Upvotes: 1

stan
stan

Reputation: 4995

Not sure, you have to provide more code for us to see what could be wrong. On the other hand, check out *Zend's Zend_Translate_Adapter_Gettext*. You can find more info on Zend adaptors here: http://framework.zend.com/manual/en/zend.translate.adapter.html

Upvotes: 0

Related Questions