[Zope-dev] Multilingual websites
Bjorn Stabell
bjorn@exoweb.net
Mon, 18 Dec 2000 17:32:03 +0800
Hi there,
I'm working on improving the support for multilingual websites in Zope.
Already I've found some tools to be of great help: SiteAccess,
Translator, and Transparent Folder (and zzLocale, although I'm mostly
interested in ZODB objects). The Transparent Folder enabled me to
separate the code, content, and design into separate folders (yeah! it
should really be part of the core!), the Translator allows me to
externalize strings and localize objects that I want to include (via
<dtml-lvar).
I've run into a couple of problems with the Translator product, though,
mainly because I want to localize whole documents, but let them keep the
same URL. Let's say I have a "product_info" document. I could put it
in a separate ISO language folder, e.g., zh/de/fr/en/no, but then the
normal traversal engine can't find it (only dtml-lvar can) unless I
explicitly say which folder it is in, which kind-of ruins the point.
The ideal case is that:
http://website/company/info
would find and return
zh/company/info
de/company/info
...
company/info
based on the user's language preference. I thought about using
SiteAccess to do that, but it's proving hard, and also would only allow
me to do a "language split" at the top. A more interesting solution
would be to patch the traversal engine (could I do it with SiteAccess?)
to look for a particular language version of each object (designated by
adding the language's ISO code to the name or some other such
convention); in that way I could make company/ a global directory, or I
would chose to make it into a localized directory, i.e., all of these
would work:
company:zh/info
company/info:zh
company:de/info
etc...
Could this be done with Zope?
Another thought was to make a special Transparent Folder (maybe called
Localized Folder) that would resolve accesses to subobjects based on the
user's language preference. Different language versions of each object
could be put in separate sub-folders, as it is for the Translator
product.
PS! Any chance of seeing an integration of the core (at least language
matching) functionality of Translator and zzLocale? These two products
should really become part of the core ASAP, in some form or another.
Bye,
--
Bjorn