Skip to content Skip to sidebar Skip to footer

Thread Safe Locale Techniques

We're currently writing a web application based on a threaded python web server framework (cherrypy) and would like to simultaneously support users from multiple locales. The local

Solution 1:

Babel is an excellent library for all your thread-safe i18n needs plus a pluggable framework to extract messages from Python sources and web templates.

Solution 2:

pyIcu has some such functionality (and other great support for i18n/l10n tasks), and I've been using it some of the time, but it's far from a smooth port of locale-based code -- you'll basically have to rewrite your code for it. Also, it doesn't support environments where you're not allowed to install arbitrary extensions, such as App Engine and some other hosted environments. Unfortunately I don't know of a good alternative without such constraints:-(.

Post a Comment for "Thread Safe Locale Techniques"