mirror of https://github.com/Syncplay/syncplay
parent
1daea64327
commit
25314cb552
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue