add i18n selector

This commit is contained in:
Anya Tokugawa committed 2026-05-31 21:58:48 +09:00
1 parent 49a88460b4
commit e3a28c9f62
9 files changed
+291 -79

No files matched your search

+13
View File
@@ -46,6 +46,18 @@ func (s *Server) handleConfig(
return
}
err = s.store.SetConfig(
"locale",
normalizeLocale(
strings.TrimSpace(r.FormValue("locale")),
),
)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
case "nav":
labels := r.Form["nav_label"]
@@ -149,6 +161,7 @@ func (s *Server) handleConfig(
map[string]any{
"HomePath": homePath,
"WikiName": wikiName,
"Locale": s.getLocale(),
"Objects": recent,
"NavItemsConfig": s.getNavItems(),
},