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}} +