milestone: create page

This commit is contained in:
Unknwon 2015-08-05 15:24:26 +08:00
parent ce4dcf1e83
commit 3e4cdccf6b
76 changed files with 2883 additions and 3484 deletions

View file

@ -134,6 +134,7 @@ var (
// I18n settings.
Langs, Names []string
dateLangs map[string]string
// Other settings.
ShowFooterBranding bool
@ -148,6 +149,14 @@ var (
HasRobotsTxt bool
)
func DateLang(lang string) string {
name, ok := dateLangs[lang]
if ok {
return name
}
return "en"
}
func init() {
IsWindows = runtime.GOOS == "windows"
log.NewLogger(0, "console", `{"level": 0}`)
@ -353,6 +362,7 @@ func NewConfigContext() {
Langs = Cfg.Section("i18n").Key("LANGS").Strings(",")
Names = Cfg.Section("i18n").Key("NAMES").Strings(",")
dateLangs = Cfg.Section("i18n.datelang").KeysHash()
ShowFooterBranding = Cfg.Section("other").Key("SHOW_FOOTER_BRANDING").MustBool()