Dear Lazyweb,
I’ve been toying around with a python WSGI application, i.e. a multi-threaded persistent web application. Now I’d like to add multi-language support to this application. I need to format datetimes to human readable formats, but I havn’t found a way yet to do this in a sane way using strftime. Essentially, strftime will use the current application locale; however since I’m running multi-threaded, different threads might want to use different locales. So changing the locale is bound to cause race conditions.

So what is the best way to pretty-print (including week day names!) datetime, currency and similar values in a multi-threaded multi-locale context in python? Gettext and manually emulating strftime doesn’t sound that sensible to me. And of course, I don’t want to have to translate the weekday names myself into any language I choose to support…