1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 20:41:57 +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:
Gerasimos (Makis) Maropoulos
2020-05-04 19:13:06 +03:00
parent 68fda360db
commit 20fcfb4110
6 changed files with 65 additions and 9 deletions

View File

@@ -78,6 +78,9 @@ type ConfigurationReadOnly interface {
// GetTranslateLanguageContextKey returns the configuration's LocaleContextKey value,
// used for i18n. Defaults to "iris.locale".
GetLocaleContextKey() string
// GetLanguageContextKey returns the configuration's LanguageContextKey value,
// used for i18n. Defaults to "iris.locale.language".
GetLanguageContextKey() string
// GetViewLayoutContextKey returns the key of the context's user values' key
// which is being used to set the template