diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-10-28 15:52:42 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-10-28 15:52:45 -0700 |
commit | f2157215e23fcb6583d090faf8cff49e9e6a7b12 (patch) | |
tree | 3fd97bdf1a34442daa70e6a55167580ff2f2c72e /fatcat_scholar/web.py | |
parent | 00e99192e7f746d7739adfe031b72bd7b0fee1a6 (diff) | |
download | fatcat-scholar-f2157215e23fcb6583d090faf8cff49e9e6a7b12.tar.gz fatcat-scholar-f2157215e23fcb6583d090faf8cff49e9e6a7b12.zip |
web: fix lang detection (include 'en')
If a user had any non-english language preference, was defaulting to
that, even if 'en' had higher preference.
Diffstat (limited to 'fatcat_scholar/web.py')
-rw-r--r-- | fatcat_scholar/web.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py index 79b4f30..2e7359b 100644 --- a/fatcat_scholar/web.py +++ b/fatcat_scholar/web.py @@ -43,7 +43,7 @@ class LangPrefix: # first try to parse a language code from header try: accept_code = parse_accept_lang( - request.headers.get("accept-language", ""), I18N_LANG_TRANSLATIONS, + request.headers.get("accept-language", ""), I18N_LANG_OPTIONS, ) if accept_code: self.code = accept_code |