[Zope] formatting date values.
Andreas Kostyrka
andreas@mtg.co.at
Sun, 25 Jul 1999 11:15:29 +0200 (CEST)
On Sat, 24 Jul 1999, Rob Page wrote:
> o time expressions
> o timezones
> o currency expressions
>
> etc., is much less dependent on the current patch-the-code mechanism and
> would thereby let people _easily_ define their own date and currency
I've been thinking more about property based way.
By setting the property "country" to say "de" or "at", one would select
localization for the given country. (Yes, there are some minor differences
between Austrian and German usage ;) ). This property would influence all
formats to behave correctly, be it currency or date values.
(There are more ways, for example the Japanese use another format when I
recall correctly.)
This way, one could have the following layout:
/Document/
index_html <-- layout
index_text <-- real text in say English. (main language)
/Document/French/
index_text <-- translation to French.
country="fr"
/Document/German/
index_text <-- translation to German.
country="de"
...
Only problem with this is, that to mix formats on one page, one would need
either:
-) extend dtml-var to take an country= parameter.
-) create Subfolders that only contain the property, and use dtml-with
e.g.: <dtml-with germanfmt><dtml-var somedatevalue></dtml-with>
> formats without having to repatch their software every time a release is
> made. Of course, the Z2 alpha and beta process has taken some attention
> away from this. I would encourage you to join the Zope
> Internationalization Project (ZIP).
Where can one join?
Andreas
--
Andreas Kostyrka | andreas@mtg.co.at
phone: +54/1/7070750 | phone: +43/676/4091256
MTG Handelsges.m.b.H. | fax: +43/1/7065299
Raiffeisenstr. 16/9 | 2320 Zwoelfaxing AUSTRIA