[Zope-CMF] Re: [dev] i18n improvements - a proposal

Florent Guillaume fg at nuxeo.com
Wed Aug 10 08:13:10 EDT 2005


Hi Yuppie,

yuppie wrote:
> Zope 2.8.1 with Five 1.1 and Zope 2.9 will come with integrated i18n 
> support. Localizer / PTS are no longer needed.
> 
> CMF currently has limited i18n support and describes in INSTALL.txt how 
> to use it with Localizer and TranslationService.
> 
> 
> I propose the following changes on CMF trunk:

 > 1.) Using zope.i18nmessageid.MessageIDFactory in Python code:
 > 2.) Using different domains for different products:
 > 3.) Adding a utility script for extracting i18n messages:
 > 5.) Adding translations:

+1 from me on these.

> 4.) Adding i18n support for settings loaded from profiles:
> 
> This is the most difficult part and so far I just have some ideas.
> 
> One issue is extracting message strings. I hope to find a way to use the 
> i18n namespace in profile XML files. This would allow to use the 
> standard tools.

You still would have to store this somewhere in the ZODB after the loading, 
to allow the user to change the domains.

> The other issue is handling some settings like 'Title' and 'Description' 
> fields as MessageIDs. AFAICS a first step would be adding a 'domain' 
> field to Actions and TypeInfos. Don't know if we can just use the old 
> attributes and return MessageIDs instead of strings or if we need new 
> attributes. This depends on possible backwards compatibility issues.

Here we're talking about content or meta-content, right? So the i18n problem 
is different than for the code -- you have to decide if a Title field (for 
instance) is a msgid or not. Maybe an empty i18n_domain could mean "don't 
translate", and a non-empty one would mean "translate using this domain". 
Another option would be a checkbox is_i18n that would change the 
interpretation of title/description from text to msgids. Or you could have 
i18n_msgid and i18n_domain, that would be used if i18n_msgid is not empty, 
otherwise the normal title field is used. They are many choices. But you 
can't say by fiat that all Title and Decription fields will become 
mandatorily i18ned, some people will want to go in the ZMI and directly 
change action titles or description in their own single language.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope-CMF mailing list