mirror of
https://github.com/searxng/searxng.git
synced 2025-08-19 02:06:50 +02:00
[mod] add flags to the languages filter
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
7625da9fa0
commit
2841abaf55
6 changed files with 139 additions and 78 deletions
|
@ -85,7 +85,7 @@ class LanguageParser(QueryPartParser):
|
|||
# check if any language-code is equal with
|
||||
# declared language-codes
|
||||
for lc in language_codes:
|
||||
lang_id, lang_name, country, english_name = map(str.lower, lc)
|
||||
lang_id, lang_name, country, english_name, _flag = map(str.lower, lc)
|
||||
|
||||
# if correct language-code is found
|
||||
# set it as new search-language
|
||||
|
@ -128,7 +128,7 @@ class LanguageParser(QueryPartParser):
|
|||
for lc in language_codes:
|
||||
if lc[0] not in settings['search']['languages']:
|
||||
continue
|
||||
lang_id, lang_name, country, english_name = map(str.lower, lc)
|
||||
lang_id, lang_name, country, english_name, _flag = map(str.lower, lc)
|
||||
|
||||
# check if query starts with language-id
|
||||
if lang_id.startswith(value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue