fix languages
This commit is contained in:
parent
7502780194
commit
bb80e8b460
2 changed files with 4 additions and 4 deletions
1
main.go
1
main.go
|
@ -13,7 +13,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed static/*
|
//go:embed static/*
|
||||||
//go:embed static/*/*
|
|
||||||
var embedFS embed.FS
|
var embedFS embed.FS
|
||||||
|
|
||||||
func run() error {
|
func run() error {
|
||||||
|
|
|
@ -61,10 +61,11 @@ function initLanguageButtons() {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("load", async () => {
|
window.addEventListener("load", async () => {
|
||||||
const lang = localStorage.getItem(LANGUAGE_KEY);
|
let lang = localStorage.getItem(LANGUAGE_KEY);
|
||||||
if (lang != null) {
|
if (lang == null) {
|
||||||
await setLanguage(lang);
|
lang = "en";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await setLanguage(lang);
|
||||||
initLanguageButtons();
|
initLanguageButtons();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue