Reputation: 1058
I have a zope instance with many plone sites each for different customers. I want override particular translations such as the date format just for a single plone site without affecting the others. How do I do this?
Tutorials such as http://maurits.vanrees.org/weblog/archive/2010/10/i18n-plone-4#overriding-translations seem to indicate custom translations override all sites on a zope instance.
Upvotes: 2
Views: 1283
Reputation: 1058
This is how I solved it. It's a bit of a hack solution but it worked for my particular scenario.
As per http://maurits.vanrees.org/weblog/archive/2010/10/i18n-plone-4#overriding-translations I
The other gotcha is that when releasing and deploying your locales package make sure that you've
This does not get me a custom date format for every single site but good enough if the custom date format you want is actually that of the language variant you choose to use.
Upvotes: 4
Reputation:
You can implement your own zope.i18n.interfaces.ITranslationDomain utility which looks up translations in a different place. The normal translation domain utilities stores a list of gettext message catalogs. Those are loaded from mo files on the file system and registered with ZCML.
But you can implement a different translation domain, store it as a persistent utility per site and give it some additional storage to look up messages in.
Upvotes: 3