From 0824a3198734681a98e5bcc191c253639dcdf558 Mon Sep 17 00:00:00 2001 From: soneda-yuya Date: Sun, 12 Jan 2025 13:48:21 +0900 Subject: [PATCH] refactor LanguageExtractor --- server/internal/app/lang.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/internal/app/lang.go b/server/internal/app/lang.go index 11985a2dda..7d19063ef5 100644 --- a/server/internal/app/lang.go +++ b/server/internal/app/lang.go @@ -16,7 +16,7 @@ func LanguageExtractor(req *http.Request) string { // if user language is not "und", use user language // if user language is "und", use browser language u := adapter.User(req.Context()) - if u != nil && u.Lang().String() != "und" { + if u != nil && !u.Lang().IsRoot() { lang = u.Lang().String() }