Skip to content

Commit a40fc3d

Browse files
committed
explain how to avoid errors when overriding translations
1 parent bfb7497 commit a40fc3d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/i18n-l10n/translating-text-strings.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,31 @@ environment-vars =
437437
zcml = my.package
438438
```
439439

440+
When doing so, you may need to add the following zcml stanza in your package's `configure.zcml` file:
441+
442+
```xml
443+
444+
<include package="Products.CMFPlone" />
445+
446+
```
447+
448+
This **must** go *after* the `registerTranslations` stanza, before any other registration you may have in your package.
449+
450+
It should look like this:
451+
452+
```xml
453+
<configure xmlns:i18n="http://namespaces.zope.org/i18n"
454+
i18n_domain="my.package">
455+
<i18n:registerTranslations directory="locales" />
456+
457+
<include package="Products.CMFPlone" />
458+
459+
<!-- any other registration -->
460+
461+
</configure>
462+
```
463+
464+
440465
See the *Overriding Translations* section of Maurits van Rees's [blog entry on Plone i18n](https://maurits.vanrees.org/weblog/archive/2010/10/i18n-plone-4#overriding-translations).
441466

442467

0 commit comments

Comments
 (0)