add i18n selector
This commit is contained in:
1 parent
49a88460b4
commit
e3a28c9f62
9 files changed
+291
-79
No files matched your search
@@ -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(),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user