implemented user login.

next: find a solution for routing
This commit is contained in:
2025-06-30 21:11:42 +02:00
parent 71cf6ec96d
commit b918d453cb
33 changed files with 1232 additions and 32 deletions

View File

@@ -7,12 +7,13 @@ export async function loadTranslation(lang){
translations.values = await fetch(url).then(resp => resp.json());
}
export function t(key){
export function t(key,...args){
let set = translations.values;
var keys = key.split('.');
let keys = key.split('.');
for (let key of keys){
if (!set[key]) return keys[keys.length-1];
set = set[key];
}
for (var i in args) set = set.replace(`{${i}}`,args[i]);
return set;
}