Update i18n.py

This commit is contained in:
RVC-Boss 2023-04-22 12:22:16 +00:00 committed by GitHub
parent 978539ad0e
commit 44de5de840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ def load_language_list(language):
class I18nAuto:
def __init__(self, language=None):
if language in ['auto', None]:
language = locale.getlocale()[0]
language = locale.getdefaultlocale()[0]#getlocale can't identify the system's language ((None, None))
if not os.path.exists(f"./i18n/{language}.json"):
language = "en_US"
self.language = language