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

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