diff --git a/syncplay/messages.py b/syncplay/messages.py index f9fefac..a5e9b24 100755 --- a/syncplay/messages.py +++ b/syncplay/messages.py @@ -46,9 +46,15 @@ def getMissingStrings(): def getInitialLanguage(): - import locale try: - initialLanguage = locale.getdefaultlocale()[0].split("_")[0] + import sys + frozen = getattr(sys, 'frozen', '') + if frozen in 'macosx_app': + from PySide2.QtCore import QLocale + initialLanguage = QLocale.system().uiLanguages()[0].split('-')[0] + else: + import locale + initialLanguage = locale.getdefaultlocale()[0].split("_")[0] if initialLanguage not in messages: initialLanguage = constants.FALLBACK_INITIAL_LANGUAGE except: