kevinwang676 commited on
Commit
7a7dd38
1 Parent(s): 5976cc2

Update tools/i18n/i18n.py

Browse files
Files changed (1) hide show
  1. tools/i18n/i18n.py +2 -2
tools/i18n/i18n.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  I18N_JSON_DIR : os.PathLike = os.path.join(os.path.dirname(os.path.relpath(__file__)), 'locale')
6
 
7
  def load_language_list(language):
8
- with open(os.path.join(I18N_JSON_DIR, f"{language}.json"), "r", encoding="utf-8") as f:
9
  language_list = json.load(f)
10
  return language_list
11
 
@@ -32,5 +32,5 @@ class I18nAuto:
32
  return "Use Language: " + self.language
33
 
34
  if __name__ == "__main__":
35
- i18n = I18nAuto(language='en_US')
36
  print(i18n)
 
5
  I18N_JSON_DIR : os.PathLike = os.path.join(os.path.dirname(os.path.relpath(__file__)), 'locale')
6
 
7
  def load_language_list(language):
8
+ with open("tools/i18n/locale/zh_CN.json"), "r", encoding="utf-8") as f:
9
  language_list = json.load(f)
10
  return language_list
11
 
 
32
  return "Use Language: " + self.language
33
 
34
  if __name__ == "__main__":
35
+ i18n = I18nAuto(language='zh_CN')
36
  print(i18n)