Hi Espen.

We did the same thing for a Plone site
(a single egg containing custom translations for the plone domain and other 
domains).

We use following approach:

To customize exisiting Pone translations that live in a i18n folder:

We have a dir "i18n-overrides" in our package, this contains po files like 
plone-de.po 
The contents of the directory are copied to each zope instance using 

collective.recipe.i18noverrides

To customize translations that live in locales directories:

We import the packages we want to override translations for in zcml, before 
including the overrides.

For customizations we use a overrides.zcml registering the translations there.

For own custom translations:

For our own packages, we have all translation files in the locales structure, 
and a i18n folder inside the package.

Sounds complicated? Well it works for us.


The structure of the package is as follows:

|-- __init__.py
|-- configure.zcml
|-- i18n
|   |-- po / pot files
|-- i18n-overrides
|   |-- README.txt
|   |-- plone-de.po
|   `-- plone-es.po
|-- locales
|   |-- de
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- en
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- es
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- fr
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- it
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- ja
|   |   `-- LC_MESSAGES
|   |       |-- po files
|   |-- pot files
|-- overrides.zcml


Best regards

mr_savage

Am 06.04.2010 um 10:29 schrieb Espen Moe-Nilssen:

> Could something still renain in
> /Control_Panel/TranslationService
> 
> (Remove it there and restart zope ? )
> 
> Den 18. mar. 2010 kl. 13.37 skrev Andreas Jung:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>> 
>> Hi there,
>> 
>> we have a fairly large Plone 3.1 site (site language is DE) which
>> several add-ons and policy packages. Now we created a new package
>> idg.translations in order to override some Plone translations with
>> our own translations (in DE).
>> 
>> After the installation of the package (mr.developer, eggs + zcml slug)
>> the *complete* Plone site is show in English *only*.
>> 
>> I tried to track this down...removing the ZCML slug for idg.translations
>> brings the site back with German UI - re-adding the slut -> EN again.
>> 
>> Ok - I tried to track this down:
>> 
>>  - I removed the only .po file:
>> 
>> /src/idg.translations/idg/translations/locales/de/LC_MESSAGES/plone.po,
>> restarted the instance with ZCML slug -> site UI is in EN
>> 
>>  - I removed the registerTranslations configuration from the configure.zcml:
>> 
>> <configure
>>     xmlns="http://namespaces.zope.org/zope";
>>     xmlns:i18n="http://namespaces.zope.org/i18n";
>>     i18n_domain="plone">
>>   <i18n:registerTranslations directory="locales" />
>> </configure>
>> 
>>  and restarted -> site UI is in EN
>> 
>> The package does not contain any other stuff - only the configure.zcml
>> and the 'locales' subfolder.
>> 
>> What the hell is going on here?
>> 
>> - -aj
>> 
>> 
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>> 
>> iEYEARECAAYFAkuiHqEACgkQCJIWIbr9KYyJQQCaAikZvIYMzXFp1xVG/4z7lNMk
>> YdQAoM+50rtYquf6RETAiiq+jWrMlQW8
>> =eH4d
>> -----END PGP 
>> SIGNATURE-----<lists.vcf>_______________________________________________
>> Product-Developers mailing list
>> [email protected]
>> http://lists.plone.org/mailman/listinfo/product-developers
> 
> _______________________________________________
> Product-Developers mailing list
> [email protected]
> http://lists.plone.org/mailman/listinfo/product-developers

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to