I am trying to sort a list of strings according to language. I used the Babel library for other i18n related tasks, but it does not support sorting. The Python locale module provides the strcoll function, but requires the process locale to be set to the one I want to work with. Kind of pain, but I can live with it.
The problem is that I cannot set the locale. The documentation for the locale module shows an example:
import locale locale.setlocale(locale.LC_ALL, 'de_DE')
When I run this, I get the following:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python26\Lib\locale.py", line 494, in setlocale locale.Error: unsupported locale setting
What am I doing wrong?
python windows internationalization localization
DNS Jun 05 '09 at 13:56 2009-06-05 13:56
source share