Changes to migrate to BCP 47 locale standard

This commit is contained in:
Iker García Calviño
2025-07-15 12:51:26 +02:00
committed by Donald Zou
parent 084bec0f07
commit 99cb546b59
30 changed files with 787 additions and 1583 deletions

View File

@@ -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: