languageHandler.setLanguage: a part from loading the right gettext data for the selected language, also try and set Python's locale, and the Windows locale for the current thread, to this language. This for some reason still doesn't make wx locales work in all situations, but it does now mean that if you set NVDA's language to say... french, when its English Windows by default, the time and date script will announce propery with french day names and formatting etc. I'm sure this may also allow for some other locale-specific stuff that I can't think of right now.
@@ -25,6 +26,29 @@
gettext.translation("nvda", localedir="locale", languages=[lang]).install(True)
+ #Try setting Python's locale to lang
+ if not localeChanged and '_' in lang:
+ #Python couldn'tsupport the language_country locale, just try language.
+ #Set the windows locale for this thread (NVDA core) to this locale.
+ #To convert to windows locale, the language must be language_country, not just language
+ if '.' in tempLang:
+ #There was charset info given, wrip that out
+ #Find the windows LC ID for this locale
+ LCList=[x for x in locale.windows_locale.iteritems() if x==tempLang]
+ if len(LCList)>0: