﻿--- a/includes/language.inc
+++ b/includes/language.inc
@@ -87,7 +87,7 @@ function language_from_browser() {
       // The language part is either a code or a code with a quality.
       // We cannot do anything with a * code, so it is skipped.
       // If the quality is missing, it is assumed to be 1 according to the RFC.
-      if (preg_match('!([a-z-]+)(;q=([0-9\\.]+))?!', trim($browser_accept[$i]), $found)) {
+      if (preg_match('!([a-z-]+)(;q=([0-9\\.]+))?!', strtolower(trim($browser_accept[$i])), $found)) {
         $found[1] = trim($found[1], '-');
         $value = (isset($found[3]) ? (float) $found[3] : 1.0);
         if (!empty($browser_langs[$found[1]])) {
