[Zope] multi-language apps
Tino Wildenhain
tino@wildenhain.de
Wed, 18 Jul 2001 21:26:27 +0200
Hi Andrea,
there are some movements on internationalisation. There is ZBabel
and stuff to do word by word or sentence by sentence translation
with a similar approach like naive dictionarys.
Depending on the complexity of your application or the amount of
"creative" stuff (like an usual web site) you might consider
using Zope Page Templates for storing the content, allowing to
be translated by ordinary people.
The problem often not seen is the selection mechanism and the
posibility to allow the results to be cached by an downstream
proxy.
Using LanguageNegotiation (see www.apache.org for more information)
and sending appropriate HTTP headers you can support using proxy
caches.
I personally dont like the explizit language seletion on every site
and storage in the request or cookie, since I use to configure my
browser accordingly and expect that during the 6 to 7 years
language negotiation is available, modern sites support it.
You can view the code of my dtml-vary tag
(http://www.zope.org/Members/tino/ )
to see how to negotiate the language and send the appropriate headers.
However I would not recommend using the vary-tag for more then academic
purposes, since dtml is to be outdated.
I'm currently working on a generic mechanism that will cover all the
neads of explizit and implizit selection of language and supporting
general content negotiation too. (Imagine both HTML and WML content)
Solutions like zbabel and more can then be plugged into this mechanism.
Regards
Tino
--On Mittwoch, 18. Juli 2001 11:51 +0200 "A. Giacomelli" <andreag@crs4.it>
wrote:
> hi,
>
> i would appreciate feedback from the list on the implementation of
> multilanguage applications in zope.
>
> my experience is in php, where i have been working wih 'dictionaries'
> based on associative arrays, e.g.
>
> key_water->
> 'it' -> 'acqua',
> 'en' -> 'water',
> ...
>
> and then retrieving definitions via something like
>
> getdef($selected_language,key_water)
>
> other localization issues (e.g. changing international phone prefixes,
> currency etc.) are then dealt with by checking the $selected_language
> variable (typically associated to a cookie).
>
> i have read about the dtml-vary tag, but i would not see it impractical
> to implement database-based dictionaries close to the associative array
> thing.
>
> TIA for any comments, and regards
> --
> =========================================
> Andrea Giacomelli
> Centre for Advanced Studies, Research and
> Development in Sardinia
> Environment Group
>
> http://www.crs4.it/~andreag
> =========================================
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )