diff --git a/files/usr/share/ucode/aredn/units.uc b/files/usr/share/ucode/aredn/units.uc index d50d1b06..a73fd4be 100755 --- a/files/usr/share/ucode/aredn/units.uc +++ b/files/usr/share/ucode/aredn/units.uc @@ -38,7 +38,7 @@ let metric = null; function isMetric() { if (metric === null) { - const lang = request?.env?.HTTP_ACCEPT_LANGUAGE || "en-US"; + const lang = split(request?.env?.HTTP_ACCEPT_LANGUAGE || "en-US", ",")[0]; if (index(lang, "-US") !== -1 || index(lang, "-GB") !== -1) { metric = false; }