diff options
| author | Alexandre Flament <alex@al-f.net> | 2023-02-20 12:17:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 12:17:38 +0100 |
| commit | d669da81fbe820df2d97c98560d00dee32979dc9 (patch) | |
| tree | 4cbaf3332893934640c8ff0724bcc2019b579618 /searx/webapp.py | |
| parent | 60e181607def7b48185728e1fd395c0036bd65fb (diff) | |
| parent | 0b1444b61eb12a2d23d4c95e2440f24161daaec7 (diff) | |
Merge pull request #2027 from dalf/fix_2018
Add "auto" as a language.
Diffstat (limited to 'searx/webapp.py')
| -rwxr-xr-x | searx/webapp.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 6746f7a00..95c33f704 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -810,6 +810,9 @@ def search(): ) ) + # search_query.lang contains the user choice (all, auto, en, ...) + # when the user choice is "auto", search.search_query.lang contains the detected language + # otherwise it is equals to search_query.lang return render( # fmt: off 'results.html', @@ -834,6 +837,11 @@ def search(): settings['search']['languages'], fallback=request.preferences.get_value("language") ), + search_language = match_language( + search.search_query.lang, + settings['search']['languages'], + fallback=request.preferences.get_value("language") + ), timeout_limit = request.form.get('timeout_limit', None) # fmt: on ) |