[Nvda-dev] commit r1966 - trunk/source

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] commit r1966 - trunk/source

NVDA Subversion
Author: mdcurran
Date: Fri Apr 25 06:26:30 2008
New Revision: 1966

Log:
Core.main: finally force wx to use the locale according to the current NVDA language. This now means that if you change your NVDA language, wx  control names such as OK and cancel should now show in your chosen language. It does seem though that wx only has support for languages, not language_country languages (for instance it can't tell the difference between pt_br and pt_pt). Also there doesn't seem to be support for zh (Chinese). But languages such as fr, es, pt, de all seem to work).

Modified:
   trunk/source/core.py

Modified: trunk/source/core.py
==============================================================================
--- trunk/source/core.py (original)
+++ trunk/source/core.py Fri Apr 25 06:26:30 2008
@@ -97,7 +97,15 @@
  gui.initialize(app)
  # initialize wxpython localization support
  locale = wx.Locale()
- locale.Init2()
+ lang=languageHandler.getLanguage()
+ if '_' in lang:
+ wxLang=lang.split('_')[0]
+ else:
+ wxLang=lang
+ try:
+ locale.Init(lang,wxLang)
+ except:
+ pass
  import speechDictHandler
  globalVars.log.debug("Speech Dictionary processing")
  speechDictHandler.initialize()