Failure to set locale

David Hughes david at forestfield.co.uk
Mon Jul 22 06:22:00 EDT 2002


As a fairly-newbie, I'm trying to use the locale module for the first 
time, using Python 2.2 under Win2k. If I call locale.setlocale with a 
locale of 'de' for Germany or 'es' for Spain, I get "Error: locale setting 
not supported". However, if I use 'ge' and 'sp'(which aren't the ISO 
approved names), the correct locale is set. The only way I can get the 
locale set for Denmark is to actually change the region in Windows' 
Control Panel. I have also tried using the strings returned from 
locale.normalize that are supposed to be suitable for use with 
locale.setlocale but without success.
Can anyone suggest what's going wrong, please?



More information about the Python-list mailing list