Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions source/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,10 @@ def initialize():
if mainFrame:
raise RuntimeError("GUI already initialized")
mainFrame = MainFrame()
wxLang = core.getWxLang(languageHandler.getLanguage())
mainFrame.SetLayoutDirection(wxLang.LayoutDirection)
Comment thread
feerrenrut marked this conversation as resolved.
Resolved
wxLang = core.getWxLangOrNone(languageHandler.getLanguage())
if wxLang:
# otherwise the system default will be used
mainFrame.SetLayoutDirection(wxLang.LayoutDirection)
wx.GetApp().SetTopWindow(mainFrame)
# In wxPython >= 4.1,
# wx.CallAfter no longer executes callbacks while NVDA's main thread is within apopup menu or message box.
Expand Down
3 changes: 2 additions & 1 deletion source/languageHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ def setLanguage(lang):
# #9207: Python 3.8 adds gettext.pgettext, so add it to the built-in namespace.
trans.install(names=["pgettext"])

def getLanguage():

def getLanguage() -> str:
return curLang

def normalizeLanguage(lang):
Expand Down