mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
Store language in session to show the login page translated
This commit is contained in:
parent
6302c3b219
commit
bdcc4134fa
7 changed files with 30 additions and 9 deletions
|
@ -59,6 +59,7 @@ func (s *SessionMiddleware) Handler(next http.Handler) http.Handler {
|
|||
ctx = context.WithValue(ctx, OAuth2StateContextKey, session.Data.OAuth2State)
|
||||
ctx = context.WithValue(ctx, FlashMessageContextKey, session.Data.FlashMessage)
|
||||
ctx = context.WithValue(ctx, FlashErrorMessageContextKey, session.Data.FlashErrorMessage)
|
||||
ctx = context.WithValue(ctx, UserLanguageContextKey, session.Data.Language)
|
||||
next.ServeHTTP(w, r.WithContext(ctx))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue