This commit is contained in:
a-ill
2023-07-03 21:27:18 +03:00
parent a0f672439d
commit ea157a6031
28 changed files with 143 additions and 133 deletions

View File

@@ -91,14 +91,15 @@ export function loadLocaleContent(content,componentName,loaded,callback) {
locale = "en"
}
}
if (callback!=undefined) {
callback(locale)
}
getData("/locales/" + locale + "/" + componentName + ".json" ,function(response) {
let parsed = JSON.parse(response)
content.set(parsed)
if (callback!=undefined) {
callback(locale)
}
loaded = 1
})
return locale
}
export function getLocale(locale,lang) {