mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-02-18 01:01:59 +00:00
optimize: move i18n to lib
This commit is contained in:
4
i18n.py
4
i18n.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user