mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-04 00:06:18 +00:00
Changes to migrate to BCP 47 locale standard
This commit is contained in:
committed by
Donald Zou
parent
084bec0f07
commit
99cb546b59
@@ -1110,9 +1110,9 @@ def API_Welcome_Finish():
|
||||
|
||||
class Locale:
|
||||
def __init__(self):
|
||||
self.localePath = './static/locale/'
|
||||
self.localePath = './static/locales/'
|
||||
self.activeLanguages = {}
|
||||
with open(os.path.join(f"{self.localePath}active_languages.json"), "r") as f:
|
||||
with open(os.path.join(f"{self.localePath}supported_locales.json"), "r") as f:
|
||||
self.activeLanguages = sorted(json.loads(''.join(f.readlines())), key=lambda x : x['lang_name'])
|
||||
|
||||
def getLanguage(self) -> dict | None:
|
||||
|
Reference in New Issue
Block a user