From 6e404ddb931542fd79a6e71dbca117661b45f61e Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Fri, 24 Jul 2020 15:59:07 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A2=9E=E5=8A=A0=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/language.go | 32 ++++++++++++++++++++++++++++++++ static/html/index.html | 32 ++++++++++++++++++++------------ tmpl/common.go | 18 ++++++++++++++++-- 3 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 config/language.go diff --git a/config/language.go b/config/language.go new file mode 100644 index 0000000..1f3a11e --- /dev/null +++ b/config/language.go @@ -0,0 +1,32 @@ +package config +type Language struct { + WebCopyRight string + MainIntro string + IndexSubIntro,IndexVisitors,IndexAgent,IndexDocument string +} +func CreateLanguage(lang string)*Language{ + var language *Language + if lang=="en"{ + language=&Language{ + WebCopyRight: "TaoShihan", + MainIntro: "Simple and Powerful Go language online customer chat system", + IndexSubIntro: "GO-FLY, a Vue 2.0-based online customer service instant messaging system for PHP engineers and Golang engineers", + IndexDocument:"API Documents", + IndexVisitors:"Visitors Here", + IndexAgent:"Agents Here", + } + } + if lang=="cn"{ + language=&Language{ + WebCopyRight: "陶士涵的菜地版权所有", + MainIntro:"极简强大的Go语言在线客服系统", + IndexSubIntro:"GO-FLY,一套为PHP工程师、Golang工程师准备的基于 Vue 2.0的在线客服即时通讯系统", + IndexVisitors:"访客入口", + IndexAgent:"客服入口", + IndexDocument:"接口文档", + } + } + return language +} + + diff --git a/static/html/index.html b/static/html/index.html index e77ac26..6e7af7b 100644 --- a/static/html/index.html +++ b/static/html/index.html @@ -4,8 +4,8 @@ - GO-FLY - 极简强大的Golang在线客服系统 - + GO-FLY - {{.WebDesc}} +