🌐 localization [skip ci]

This commit is contained in:
naiba
2022-04-27 23:51:45 +08:00
parent 0a6658fcb4
commit 7bd67b2233
15 changed files with 92 additions and 34 deletions

View File

@@ -51,8 +51,9 @@ func (c *AgentConfig) Save() error {
// Config 站点配置
type Config struct {
Debug bool // debug模式开关
Site struct {
Debug bool // debug模式开关
Language string // 系统语言,默认 zh-CN
Site struct {
Brand string // 站点名称
CookieName string // 浏览器 Cookie 名称
Theme string
@@ -100,6 +101,9 @@ func (c *Config) Read(path string) error {
if c.Site.Theme == "" {
c.Site.Theme = "default"
}
if c.Language == "" {
c.Language = "zh-CN"
}
if c.GRPCPort == 0 {
c.GRPCPort = 5555
}