majelbstoat wrote: > > Hi All, > > Does anybody have any suggestions on how I might generate a .po file from > the messages to be translated in Zend_Form? All the examples I've seen > using Zend_Translate and Zend_Form use the 'array', rather than 'gettext' > form. The .po for the rest of the app is quite happily generated by > Poedit, but I'm not sure what to do about those validator constants. I > have my singular Zend_Translate object in the registry and I'd like to > reuse it for everything, if possible. > > Failing that, has someone else faced the same and come up with an > alternative solution? > > Cheers, > > Jamie. >
This is a very interesting question. I have the same problem and any suggestion will be useful. At current time my idea is to make a separate single file with a copy of all labels and error messages and parse it with xgettext -a, but this is a bad practice because i have to duplicate all the strings and duplication is always bad :-( An other solution is to run xgettext -a directly on files that generate the forms, in my case when i need a new form I subclass a shared common abstract class, so in my form files there are only label strings and some array keys, so I can generate a po file for translators and they can safely ignore some strings such as 'label', 'required', etc or if they translate them there is no consequences, because those strings are not being translated with Zend_Translate_Adapter. In both these (poor) solutions remain the problem of validators error messages index; in the first case i could copy such indexes in the label files, in the second case i have no idea... -- View this message in context: http://www.nabble.com/Using-a-gettext-Zend_Translate-object-with-Zend_Form-tp16092578s16154p16188858.html Sent from the Zend Framework mailing list archive at Nabble.com.
