Skip to content

Commit ac34417

Browse files
authored
Merge pull request #1698 from plone/erral-overriding-translations
explain how to avoid errors when overriding translations
2 parents bfb7497 + 207f71f commit ac34417

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,29 @@ 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 {file}`configure.zcml` file:
441+
442+
```xml
443+
<include package="Products.CMFPlone" />
444+
```
445+
446+
This **must** go *after* the `registerTranslations` stanza, and before any other registration you might have in your package.
447+
448+
The registration should look like the following example.
449+
450+
```xml
451+
<configure xmlns:i18n="http://namespaces.zope.org/i18n"
452+
i18n_domain="my.package">
453+
<i18n:registerTranslations directory="locales" />
454+
455+
<include package="Products.CMFPlone" />
456+
457+
<!-- any other registration -->
458+
459+
</configure>
460+
```
461+
462+
440463
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).
441464

442465

0 commit comments

Comments
 (0)