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/*/*
|
||||
var embedFS embed.FS
|
||||
|
||||
func run() error {
|
||||
|
|
|
@ -61,10 +61,11 @@ function initLanguageButtons() {
|
|||
}
|
||||
|
||||
window.addEventListener("load", async () => {
|
||||
const lang = localStorage.getItem(LANGUAGE_KEY);
|
||||
if (lang != null) {
|
||||
await setLanguage(lang);
|
||||
let lang = localStorage.getItem(LANGUAGE_KEY);
|
||||
if (lang == null) {
|
||||
lang = "en";
|
||||
}
|
||||
|
||||
await setLanguage(lang);
|
||||
initLanguageButtons();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue