[Zope] ZopeTime in english
André Camargo
acamargo@supersul.com.br
Wed, 10 Oct 2001 16:43:50 -0200
Peter Bengtsson wrote:
>
> # Localization support
> LOCALE_ID=None
>
> ...no.
>
> It's a windows duoubleclick installation.
>
> In the Python interpreter:
>
> >>> DateTime().strftime('%A')
> 'Wednesday'
>
> In a Python Script:
> return context.ZopeTime().strftime('%A')
> # and it returns: 'onsdag' (which is wednesday in
> swedish)
> (note also the difference in capitalization)
>
> Where my problem originates is in a Python Product
> where I also use DateTime; and get the bloody local
> representation.
>
> I could translate the swedish results to 'monday',
> 'tuesday' etc. but what if somebody installs my code
> on their french machines?
hello
I'm running debian potato here and z2.py's option -L doesn't work, Zope
always use the $LANG locale...
take a look:
acamargo@zope:~/zope241src$ export LANG="pt_BR"
acamargo@zope:~/zope241src$ ./start -L "en_US"
I have a dtml method with: <dtml-var ZopeTime fmt="%c">, that returns:
Qua 10 Out 2001 16:36:51 BRT
:~
I finished a DateTime's i18n version too... If somebody wants to try,
send me a mail :)
thanks
andré