A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
add template language
aichy1261860f3ecef43
diff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.goindex 0d4bd3f0..3a2bd095 100644--- a/internal/controller/template_controller.go+++ b/internal/controller/template_controller.go@@ -470,6 +470,8 @@ func (tc *TemplateController) html(ctx *gin.Context, code int, tpl string, siteIdata["description"] = siteInfo.Descriptiondata["language"] = handler.GetLang(ctx)data["timezone"] = siteInfo.Interface.TimeZone+ language := strings.Replace(siteInfo.Interface.Language, "_", "-", -1)+ data["lang"] = languagedata["HeadCode"] = siteInfo.CustomCssHtml.CustomHeaddata["HeaderCode"] = siteInfo.CustomCssHtml.CustomHeaderdata["FooterCode"] = siteInfo.CustomCssHtml.CustomFooterdiff --git a/ui/template/header.html b/ui/template/header.htmlindex f43213ad..52e40765 100644--- a/ui/template/header.html+++ b/ui/template/header.html@@ -1,6 +1,6 @@{{define "header"}}<!DOCTYPE html>-<html>+<html lang="{{.lang}}"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" />