aboutsummaryrefslogtreecommitdiffhomepage
path: root/http/handler/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'http/handler/handler.go')
-rw-r--r--http/handler/handler.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/http/handler/handler.go b/http/handler/handler.go
index 3dd1d1b..882e0bd 100644
--- a/http/handler/handler.go
+++ b/http/handler/handler.go
@@ -46,9 +46,10 @@ func (h *Handler) Use(f ControllerFunc) http.Handler {
ctx := NewContext(r, h.store, h.router, h.translator)
request := NewRequest(r)
response := NewResponse(w, r, h.template)
+ language := ctx.UserLanguage()
- if ctx.IsAuthenticated() {
- h.template.SetLanguage(ctx.UserLanguage())
+ if language != "" {
+ h.template.SetLanguage(language)
} else {
h.template.SetLanguage("en_US")
}