lang support

This commit is contained in:
partisan 2024-10-07 17:12:22 +02:00
parent 5822b75d66
commit 5dd3114e2d
8 changed files with 150 additions and 23 deletions

View file

@ -164,7 +164,7 @@ func handleSettings(w http.ResponseWriter, r *http.Request) {
printDebug("Rendering settings with data: %+v", data)
tmpl, err := template.ParseFiles("templates/settings.html")
tmpl, err := template.New("settings.html").Funcs(template.FuncMap{"translate": Translate}).ParseFiles("templates/settings.html")
if err != nil {
printErr("Error parsing template: %s", err)
http.Error(w, "Internal Server Error", 500)