mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-17 21:56:07 -04:00
Updated Windows dependencies. Now wx buttons and messages should be localized.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import wx
|
||||
import paths
|
||||
import languageHandler
|
||||
import sys
|
||||
|
||||
toolkit = "wx"
|
||||
|
||||
@@ -108,6 +111,15 @@ class mainLoopObject(wx.App):
|
||||
|
||||
def __init__(self):
|
||||
self.app = wx.App()
|
||||
self.lc = wx.Locale()
|
||||
lang=languageHandler.getLanguage()
|
||||
wxLang=self.lc.FindLanguageInfo(lang)
|
||||
if not wxLang and '_' in lang:
|
||||
wxLang=self.lc.FindLanguageInfo(lang.split('_')[0])
|
||||
if hasattr(sys,'frozen'):
|
||||
self.lc.AddCatalogLookupPathPrefix(paths.app_path("locales"))
|
||||
if wxLang:
|
||||
self.lc.Init(wxLang.Language)
|
||||
|
||||
def run(self):
|
||||
self.app.MainLoop()
|
||||
|
Reference in New Issue
Block a user