From 36bda2e715ed822cc495ff419ad565084e241f43 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Fri, 5 Jun 2020 10:10:46 +0200 Subject: Add language detection when the user is not logged in (#3022) Before, when the user was not logged in, pages where translated with the '_' user language. Now, they are translated with the user preferred language if there is one supported by FreshRSS or with the system default language. --- lib/Minz/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Minz/Request.php') diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index b294abe26..39d172c7e 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -395,7 +395,7 @@ class Minz_Request { /** * @return array */ - public static function getPreferredLanguage() { + public static function getPreferredLanguages() { if (preg_match_all('/(^|,)\s*(?P[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE'), $matches)) { return $matches['lang']; } -- cgit v1.2.3