Overriding plone.app.locales

Hello there,

What is the canonical way (if there is any) of overriding some entries for translations in plone.app.locales?

I have a policy package, with a locales folder, and I tried to add an updated plonelocales.po there, but it seems the version on plone.app.locales always wins.

Ensure your package is loaded in zcml before plone.app.locales:

  1. in your configure.zcml load your policies locales as first: <i18n:registerTranslations directory="locales" />
  2. in buildout.cfg instance eggs and esp. in zcml section your package is the only or at least first one (esp. no Plone/Products.CMFPlone)
  3. try to avoid z3c.autoinlcude features
1 Like

See alternative instructions here:

You can add a locales folder in your buildout folder
There you place po files with same name as the file you want overwrite

1 Like

After doing that, you may need to add the following line in your configure.zcml just after the i18n:registerTranslations directive:

<include package="Products.CMFPlone" />

We were just biten by this.


Plone Foundation Code of Conduct