1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

i18n: subdomain code: set from cookie if settings allow it, so multiple subdomain redirections can set the language correctly instead of falling back to the default one

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-16 18:37:00 +03:00
parent 177b05b674
commit f8ac760f69
2 changed files with 19 additions and 3 deletions

View File

@@ -531,7 +531,7 @@ func (app *Application) Build() error {
if app.I18n.Loaded() {
// {{ tr "lang" "key" arg1 arg2 }}
app.view.AddFunc("tr", app.I18n.Tr)
app.Router.AddRouterWrapper(app.I18n.Wrapper())
app.Router.PrependRouterWrapper(app.I18n.Wrapper())
}
if n := app.view.Len(); n > 0 {