Setting my Locale
Robert Rawlins
robert.rawlins at thinkbluemedia.co.uk
Tue Aug 26 06:52:21 EDT 2008
Good morning Guys,
I'm running python 2.5 on a Debian based system and I'm looking for your
advice on how to set the locale for my application. I've read through the
locale module documentation http://docs.python.org/lib/module-locale.html
and tried a couple of the examples but can't seem to get it working.
For instance, when I attempt to run the following code:
import locale
locale.setlocale(locale.LC_ALL, 'de_DE')
I get an exception raised by the application which says:
Traceback (most recent call last):
File "locale_test.py", line 2, in <module>
locale.setlocale(locale.LC_ALL, 'de_DE')
File "/usr/lib/python2.5/locale.py", line 478, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
My questions are; what would be causing this error? Do I need any additional
packages installed on the system for this locale support to work properly?
How can I get a list of available locales?
Many thanks for any advice guys,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080826/b56781b3/attachment.html>
More information about the Python-list
mailing list