when you are using the function in python:
have you got this error message?
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Then you should do what I have done in ubuntu..
This intelligent man helped me .. please go to this link and follow the steps to add the locale to the list of ‘supported locales’
Also I am writing it here for your convenience:
/var/lib/locales/supported.d/local and add the following line:
Then run the python script again .. hope it will not show error this time