diff options
| author | 2020-06-05 10:10:46 +0200 | |
|---|---|---|
| committer | 2020-06-05 10:10:46 +0200 | |
| commit | 36bda2e715ed822cc495ff419ad565084e241f43 (patch) | |
| tree | 6a4fd79cd42ab76cab2338eedb02f787e4e2c3a8 /lib/Minz/Request.php | |
| parent | d4554fa087f9057610085ca685cd8fb79d8f2bd0 (diff) | |
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.
Diffstat (limited to 'lib/Minz/Request.php')
| -rw-r--r-- | lib/Minz/Request.php | 2 |
1 files changed, 1 insertions, 1 deletions
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<lang>[^;,]+)/', static::getHeader('HTTP_ACCEPT_LANGUAGE'), $matches)) { return $matches['lang']; } |
