mirror of https://gitee.com/answerdev/answer.git
add template language
This commit is contained in:
parent
f266da8cea
commit
1860f3ecef
|
@ -470,6 +470,8 @@ func (tc *TemplateController) html(ctx *gin.Context, code int, tpl string, siteI
|
|||
data["description"] = siteInfo.Description
|
||||
data["language"] = handler.GetLang(ctx)
|
||||
data["timezone"] = siteInfo.Interface.TimeZone
|
||||
language := strings.Replace(siteInfo.Interface.Language, "_", "-", -1)
|
||||
data["lang"] = language
|
||||
data["HeadCode"] = siteInfo.CustomCssHtml.CustomHead
|
||||
data["HeaderCode"] = siteInfo.CustomCssHtml.CustomHeader
|
||||
data["FooterCode"] = siteInfo.CustomCssHtml.CustomFooter
|
||||
|
|
|
@ -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" />
|
||||
|
|
Loading…
Reference in New Issue