Python 2.7.2 (default, Jun 12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32.
>>> locale.getdefaultlocale()
('ru_RU', 'cp1251') #ok, Russian locale is set, as per user settings
>>> a = datetime.date.today()
>>> a.strftime("%B %d")
March 22' #ouch, that's not Russian.
>>> locale.setlocale(locale.LC_ALL, 'russian_russia')
'Russian_Russia.1251'
>>> a.strftime("%B %d")
'Март 22' #now it's ok
So... Why doesn't it work without resetting the default locale? Is it OS related? Is there a way to do something like locale.setlocale(convert_it_somehow(locale.getdefaultlocale()))
? All I want to do is to display dates according to user's preference. Thanks!