mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-10-04 08:16:17 +00:00
Sorting language available automatically
This commit is contained in:
@@ -2995,7 +2995,7 @@ class Locale:
|
||||
self.localePath = './static/locale/'
|
||||
self.activeLanguages = {}
|
||||
with open(os.path.join(f"{self.localePath}active_languages.json"), "r") as f:
|
||||
self.activeLanguages = json.loads(''.join(f.readlines()))
|
||||
self.activeLanguages = sorted(json.loads(''.join(f.readlines())), key=lambda x : x['lang_name'])
|
||||
|
||||
def getLanguage(self) -> dict | None:
|
||||
currentLanguage = DashboardConfig.GetConfig("Server", "dashboard_language")[1]
|
||||
|
Reference in New Issue
Block a user