Set html lang attribute

This commit is contained in:
cuigh 2017-10-13 19:27:48 +08:00
parent 659e32438c
commit 42f3ad8b23
3 changed files with 3 additions and 2 deletions

View File

@ -40,6 +40,7 @@ func main() {
AddFunc("time", misc.FormatTime(setting.TimeZone.Offset)).
AddFunc("i18n", misc.Message(setting.Language)).
AddFuncs(misc.Funcs).
AddVariable("language", setting.Language).
AddVariable("version", misc.Version).
AddVariable("go_version", runtime.Version())
ws.Validator = valid.New()

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ language == "" ? "en" : language }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ language == "" ? "en" : language }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">