Using the locale module on Windows under hte IIS
Max M
maxm at mxm.dk
Fri Jun 14 06:48:57 EDT 2002
I have an app that I am putting the final touches on. Including
localisation, so that the users can use danish nummeric formats etc.
But I am very much in doubt as to how I should use the locale module. I
have found out easy enough that I need to set::
from locale import setlocale
setlocale(locale.LC_ALL, 'danish')
It kind of puzzles me as it seems that it is a global switch that is set
for the entire programme.
But I wonder exactly where to do this. It's a web app running under the
IIS, and so there is no natural starting point for the programme. Should
I encapsulate the functionality an a few wrapper functions?
Is there some kind of global variable that I can set?
Perhaps I should set it in the gloabl.asa ?
Anybody's got a clue?
regards Max M
More information about the Python-list
mailing list