optimize: move i18n to lib

This commit is contained in:
源文雨
2023-07-24 14:19:53 +08:00
parent 8364750272
commit 76c18b547c
14 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import os
def load_language_list(language):
with open(f"./i18n/{language}.json", "r", encoding="utf-8") as f:
with open(f"./lib/i18n/{language}.json", "r", encoding="utf-8") as f:
language_list = json.load(f)
return language_list
@@ -15,7 +15,7 @@ class I18nAuto:
language = locale.getdefaultlocale()[
0
] # getlocale can't identify the system's language ((None, None))
if not os.path.exists(f"./i18n/{language}.json"):
if not os.path.exists(f"./lib/i18n/{language}.json"):
language = "en_US"
self.language = language
# print("Use Language:", language)