1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 18:57:03 +00:00

i18n several improvements

trigger #1369


Former-commit-id: af16dd8de1a0096d33c4e4c97f29ec12a73302f4
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-11-22 02:57:26 +02:00
parent 377db7f822
commit 4e9a6be9aa
5 changed files with 273 additions and 141 deletions

View File

@@ -13,11 +13,11 @@ var i18nConfig = i18n.Config{
"zh-CN": "./locales/locale_zh-CN.ini", // maps to zh-CN, zh-cn and zh.
},
// Optionals.
Alternatives: map[string]string{ // optional.
"english": "en-US", // now english maps to en-US
"greek": "el-GR", // and greek to el-GR
"chinese": "zh-CN", // and chinese to zh-CN too.
},
// LanguagesMap: i18n.Map{
// "en": "en-US", // now en maps to en-US
// "el": "el-GR",
// "zh": "zh-CN",
// } or a custom i18n.MapFunc, defaults to accept all lowercase and [en] as [en-US] and e.t.c.
URLParameter: "lang",
Subdomain: true,
// Cookie: "lang",