[Zope-dev] i18n of zope managed contents

Tres Seaver tseaver@palladion.com
Wed, 23 Feb 2000 15:52:01 -0600


fog@mixadlive.com (Federico Di Gregorio) wrote:
> 
> hi *,
> 
>         we are starting to build two *big* (international) sites and we
> have the need to localize them from the start. i've looked up every
> product on the zope site and read the (only?) document about l10n available:
> the "Changing Contexts in Zope" text. i still don't see a clean and simple
> solution, so i am thinking about writing a product to help with localization.
> but i don't want to reinvent the wheel so here's what i am trying to do.
> (comments and pointers to documentation are welcome!)
> 
> ** THE SIMPLIEST WAY **
> 
> create an L10N object able to render its contents accordingly to a
> global variable (e.g., a cookie.) you just set one property for every
> language (property name == language id) and you are done. i can also
> throw in some nice dtml to let the translators do their job inside
> zope in the properties tab, etc... the main problem here is exponential
> object growth. a complex page can easily need teens or hundreds of such
> objects.
> 
> ** THE IMHO BEST WAY **
> 
> subclass the Folder object and add (i don't even know if that is possible,
> no documentation about it) a new kind of property, lets call it "L10NText."
> when the L10NFolder is asked for data, it returns the right translation,
> based on the same global variable as above. write some pretty complex dtml
> that lets you add L10NText, and, for every L10NText var, add translations.
> This approach keeps the number of objects low and all the translated text
> is some well-defined place.
> 
> what do you zope gurus think about it?

The ZI18N product in my Zope.org folder does something like this:

  http://www.zope.org/Members/tseaver/ZI18N

I am CC'ing the Zope I18N Project mailing list (zip@eevolute.com) -- you
probably want to subscribe there as well
(http://www.eevolute.com/mailman/listinfo/zip).

-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com