Re: plone4: how to override translations in plone.app.locales?
Hanno Schlichting <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Hi. On Tue, Aug 24, 2010 at 1:17 PM, Petri Savolainen <[email protected]> wrote: > Apparently the old method of creating i18n folder inside instance home > does not work for overriding translations in locales, so what does? plone.app.locales has switched over to the modern locales folder format instead of the old i18n format. So old i18n folder approaches don't work anymore. > Someone mentioned that adding some zcml to register another directory > for i18n stuff could work, but the post did not give any specifics nor > examples. Is that how it is done - what's the syntax and which zcml > file to modify - and what's the folder/file structure for the override > directory holding the new translations? You need to have a policy or translation package for your site. Then make sure it's the first entry into the zcml option of the zope2instance part. After that you can register a normal locales directory in your package (the usual <i18n:registerTranslations directory="locales"/> line in the configure.zcml). After that you can add a plone.po file for each language you want to override messages into the normal directory structure, for in example locales/de/LC_MESSAGES for German. The file po file will be automatically compiled to a mo file on startup. All messages in your file will take precedence over any other po file for the plone domain. If you only want to add additional messages to the plone domain, then this works in the same way. You don't have to take care of the zcml ordering in that case. Hanno ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d