diff --git a/lib/i18n.php b/lib/i18n.php index 651114a..65f25b6 100644 --- a/lib/i18n.php +++ b/lib/i18n.php @@ -141,7 +141,7 @@ class i18n // check if the lang cookie was set and that language exists if (array_key_exists('lang', $_COOKIE) && in_array($_COOKIE['lang'], $availableLanguages)) { - $match = $availableLanguages['lang']; + $match = $availableLanguages[array_search($_COOKIE['lang'], $availableLanguages)]; } // find a translation file matching the browsers language preferences else