From dc31112fb7b0663b4d2c534dbe3a2057f31cd165 Mon Sep 17 00:00:00 2001 From: Anchor Date: Fri, 27 Feb 2015 22:31:46 -0800 Subject: [PATCH] Fix translation for section "I18n integration" in 14.5.md --- en/14.5.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/en/14.5.md b/en/14.5.md index 85b043eb..e888b600 100644 --- a/en/14.5.md +++ b/en/14.5.md @@ -4,13 +4,13 @@ In the chapter where we introduced internationalization and localization, we dev ## I18n integration -beego global variable is set as follows: +Beego first sets some global variables: Translation i18n.IL Lang string // set the language pack, zh, en LangPath string // set the language pack location -Multi-language function to initialize: +A multi-language initialization function is defined: func InitLang(){ beego.Translation:=i18n.NewLocale() @@ -18,7 +18,7 @@ Multi-language function to initialize: beego.Translation.SetLocale(beego.Lang) } -In order to facilitate more direct call in the template language pack, we have designed three functions to handle the response of multiple languages: +In order to facilitate multi-language calls in the template package directly, we designed three functions for handling multi-language responses: beegoTplFuncMap["Trans"] = i18n.I18nT beegoTplFuncMap["TransDate"] = i18n.I18nTimeDate