diff --git a/comp/src/gb.web/.src/Request.module b/comp/src/gb.web/.src/Request.module index a1b2b1426..f99c2793a 100644 --- a/comp/src/gb.web/.src/Request.module +++ b/comp/src/gb.web/.src/Request.module @@ -232,14 +232,17 @@ Private Function Language_Read() As String Dim aLang As String[] Dim sLang As String Dim iPos As Integer + Dim I As Integer aLang = Split(CGI["HTTP_ACCEPT_LANGUAGE"], ",") - If aLang.Count = 0 Then Return System.Language - sLang = aLang[0] - iPos = InStr(sLang, ";") - If iPos Then sLang = Left(sLang, iPos - 1) - sLang = Replace(sLang, "-", "_") - Return sLang & ".UTF-8" + + For I = 0 To aLang.Max + iPos = InStr(sLang, ";") + If iPos Then sLang = Left(sLang, iPos - 1) + If InStr(sLang, "-") Then Return Replace(sLang, "-", "_") & ".UTF-8" + Next + + Return System.Language End