-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 23.03.2009 15:57 Uhr, Kees Hink wrote:
> Found the strftime() method, but i can't get it to translate the month name:
> datetime.strftime('%d %B %Y') yields the date with an English month name ('20
> March, 2009 '). How to get that in the portal language?
> 
> Maybe i didn't find the documentation you are referring to? I found
> http://api.plone.org/Plone/2.1.1/public/DateTime.DateTime.DateTime-class.html
> (old) and http://docs.python.org/library/time.html (Zope passes strftime 
> through
> to Python's, and i wouldn't want to use the system locale for translated
> strings, as it's different from the site language). But none of them
> mention translating month names.

Writing a custom formatting method with a custom mapping month-number ->
month name is straight forward.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAknHsiwACgkQCJIWIbr9KYzfAgCfW8xkSrBodIuMWBkA18aDMYVP
1FgAnjdKe47QIgYJ3u1m/ivmppMKnbsQ
=qJN3
-----END PGP SIGNATURE-----
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to