mirror of
https://github.com/kataras/iris.git
synced 2026-01-07 20:17:05 +00:00
add a 'Context.SetLanguage', similar to pp.I18n.ExtractFunc but it can be used per-handler
relative: https://github.com/kataras/iris/issues/1502#issuecomment-623553034 Former-commit-id: 7e2fadeb60149f43edbb9e220b0274ce1160881b
This commit is contained in:
@@ -23,6 +23,7 @@ func newApp() *iris.Application {
|
||||
// Set to false to disallow path (local) redirects,
|
||||
// see https://github.com/kataras/iris/issues/1369.
|
||||
// app.I18n.PathRedirect = true
|
||||
// See app.I18n.ExtractFunc to change the way a language is extracted from a request.
|
||||
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
hi := ctx.Tr("hi", "iris")
|
||||
|
||||
Reference in New Issue
Block a user