Hello Ralf,

> I know its xmas but do you have any news on this. Just again I have the
> problem with untranslated validator messages and I am starting again to
> mess around with setting messages for each validator I use.

I haven't had much of a chance to work on this over the last two to three 
weeks, but from what I have observed while working on form validation, I'm not 
so sure whether validation error messages are translated at all - unless I've 
missed some magic that should be going on behind the scenes because I've wired 
services together in an unexpected way.

Have a look at this gist, which is an excerpt of how I set up an input filter 
within a model that implements Zend\InputFilter\InputFilterAwareInterface:

* https://gist.github.com/4359801

When rendering form errors using the Zend\Form\View\Helper\FormElementErrors 
after not having entered a firstname , the message rendered will be 
FORM_USER_FIRSTNAME_EMPTY_ERROR. The render() method of the view helper doesn't 
translate any validation error messages. The point is, I'm not sure whether it 
should, or whether translation should occur in the validator. Personally, I 
think it should be done in the former, rather than the latter.

What do you say?


Best regards,

Andreas
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to