Re: Wochentag mit DateTime in Deutsch ausgeben

Jens Vagelpohl <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization Zetwork GmbH
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/27/10 12:51 , Jens Vagelpohl wrote:
> On 2/27/10 12:00 , Peter Nassauer wrote:
>> Danke für die schnelle Antwort:
> 
>> python:DateTime(item_start).strftime('%A')
> 
>> hatte ich bereits auch versucht. Allerdings erscheint hier der Wochentag
>> auch nur in Englisch.
> 
> Dann ist bestimmt das locale nicht richtig gesetzt. Dies funktioniert
> bei mir einwandfrei:
> 
>>>> from DateTime.DateTime import DateTime
>>>> import locale
>>>> locale.setlocale(locale.LC_ALL, 'de_DE')
> 'de_DE'
>>>> DateTime().strftime('%A')
> 'Samstag'

P.S.: Das locale für einen Zope-Prozess kann man in zope.conf mit dem
Parameter "locale" setzen:

...
locale	de_DE
...

jens

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkuJCHMACgkQRAx5nvEhZLKS8gCffkzpYCV4SQViRA3II5nXasa3
ycEAnjFApae/jBrU8A2fAVMZEUG/LgQ/
=sJDy
-----END PGP SIGNATURE-----



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.