Hi!
I’m internationalizing my app by calling $translator-
>translate(’blah’) in my views and some actions. I then plan on using
poEdit to create translations similarly to this tutorial:
http://www.tornstrand.com/2008/03/29/string-localization-with-gettext-and-zend-framework/
This way poEdit will automatically detect strings that are being
passed to translate() methods and create the language templates.
The validator messages which get translated by Zend_Form won’t get
picked up this way, however, since they’re stored in arrays within
validators and then retrieved in more complex ways.
Is there a smarter way to fix this than to override all the used
validators using something like the following:
$this->_messageTemplates = array(
self::NOT_YYYY_MM_DD => $translator->translate(”‘%value%’ is not of
the format YYYY-MM-DD”),
...
);
(and then disable translation in Zend_Form, to avoid translating it
twice)
I would appreciate any suggestions!
Best regards,
Jaka Jancar