This commit is contained in:
a-ill
2023-07-03 21:28:58 +03:00
parent ea157a6031
commit 77d2aef821
2 changed files with 4 additions and 8 deletions

View File

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