Python's locale implementation seems to want to either read the locale from system settings or have it be set via a setlocale call. Neither of these work for me since I'd like to use the capabilities in a web application, where the desired locale is the user's locale.
And there are warnings in the locale docs that make the whole thing scary:
On top of that, some implementation are broken in such a way that frequent locale changes may cause core dumps. This makes the locale somewhat painful to use correctly
And
It is generally a bad idea to call setlocale() in some library routine, since as a side effect it affects the entire program
So, is there a reasonable locale alternative for use in web apps? Is Babel it or are there other alternatives? I'm looking for something that will handle currencies as well as dates and numbers.
[Update] To clarify, I'm most interested in date, number, and currency formatting for various locales.