summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authormarc <a01200356@itesm.mx>2016-12-13 21:36:40 -0600
committermarc <a01200356@itesm.mx>2016-12-13 21:36:40 -0600
commit1b46ecd21a15cdea4234a568e9ac973bb6b65b8a (patch)
tree01658643833a4af417dbea460c7df633a13649cb /searx/search.py
parent93233c786a1970b11a2f42e5afb3e3a2d8814505 (diff)
downloadsearxng-1b46ecd21a15cdea4234a568e9ac973bb6b65b8a.tar.gz
searxng-1b46ecd21a15cdea4234a568e9ac973bb6b65b8a.zip
[fix] broken language selector
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/search.py b/searx/search.py
index cef42d876..9c39a10dd 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -211,10 +211,14 @@ def get_search_query_from_webapp(preferences, form):
# set query
query = raw_text_query.getSearchQuery()
- # get last selected language in query, if possible
+ # set specific language if set on request, query or preferences
# TODO support search with multible languages
if len(raw_text_query.languages):
query_lang = raw_text_query.languages[-1]
+ elif 'language' in form:
+ query_lang = form.get('language')
+ else:
+ query_lang = preferences.get_value('language')
query_time_range = form.get('time_range')