This commit is contained in:
life committed 2014-09-22 14:06:46 +08:00
1 parent e240dfbafe
commit b8ced2e1c3
10 files changed
+326 -5

No files matched your search

+2 -1
View File
@@ -154,7 +154,7 @@ func (c BaseController) E404() revel.Result {
}
// 设置本地
func (c BaseController) SetLocale() {
func (c BaseController) SetLocale() string {
locale := string(c.Request.Locale) // zh-CN
lang := locale
if strings.Contains(locale, "-") {
@@ -165,6 +165,7 @@ func (c BaseController) SetLocale() {
lang = "en";
}
c.RenderArgs["locale"] = lang;
return lang
}
// 设置userInfo