Refactor language translations in config_launcher.py for improved readability

master
Yong-Jer Chuang 2024-04-26 14:36:43 +08:00
parent 6503612e20
commit 163810e01a
1 changed files with 3 additions and 5 deletions

View File

@ -197,14 +197,12 @@ def callbackLanguageOnChange(event):
def get_language_code_by_name(new_language):
language_code = "en_us"
if u'繁體中文' in new_language:
if '繁體中文' in new_language:
language_code = 'zh_tw'
if u'簡体中文' in new_language:
if '簡体中文' in new_language:
language_code = 'zh_cn'
if u'日本語' in new_language:
if '日本語' in new_language:
language_code = 'ja_jp'
#print("new language code:", language_code)
return language_code
def applyNewLanguage():