[Grok-dev] Internationalisation, is the howto current? (SOLUTION)
Sebastian Ware
sebastian at urbantalk.se
Fri Mar 27 15:22:54 EDT 2009
Unfortunately, the howto seems to be slightly outdated. I have now
managed to get it working by:
-updating buildout.cfg; site.zcml=
<configure i18n_domain="myproject"
xmlns:i18n="http://namespaces.zope.org/i18n">
<i18n:registerTranslations directory="locales" />
-putting the locales directory in
parts/app/locales
-running bin/buildout
I think this is the way it should be done.
Mvh Sebastian
27 mar 2009 kl. 08.47 skrev Vincent Fretin:
> On Thu, Mar 26, 2009 at 6:32 PM, Sebastian Ware <sebastian at urbantalk.se
> > wrote:
>> I have found several potential sources for error that I will
>> investigate:
>>
>> *-the locale directory should probably be in Project/src/project/
>> locale not
>> Project/locale which is how I interpreted the howto
>> *-dito the configure.zcml to edit is the one in Project/src/project
>> not
>> Project/parts/i18n
>> -I might have corrupted my project when fiddling
>>
>> * This is a bit ambiguous in the howto. Maybe it should be more
>> explicit.
>
> If you create tour project with
> grokproject MyProject,
> the file you have to edit is
> MyProject/src/myproject/configure.zcml
> create the tree MyProject/src/myproject/locales/fr/LC_MESSAGES
> put a the po file in MyProject/src/myproject/locales/fr/LC_MESSAGES/
>
> Your MyProject/src/myproject/configure.zcml should look like this:
> <configure xmlns="http://namespaces.zope.org/zope"
> xmlns:i18n="http://namespaces.zope.org/i18n"
> xmlns:grok="http://namespaces.zope.org/grok">
> <i18n:registerTranslations directory="locales" />
> <include package="grok" />
> <includeDependencies package="." />
> <grok:grok package="." />
> </configure>
>
>
> Please update the howto if you found there is some ambiguities. Thanks
> --
> Vincent Fretin
More information about the Grok-dev
mailing list