-- Jaka Jančar <[EMAIL PROTECTED]> wrote
(on Sunday, 10 August 2008, 12:31 AM +0200):
> 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:

Please search the list archives; this issue has been brought up a number
of times.


> $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!

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to