summaryrefslogtreecommitdiff
path: root/searx/utils.py
diff options
context:
space:
mode:
authorpotato <hammerl.laszlo@gmail.com>2017-06-15 10:51:09 +0200
committerAdam Tauber <asciimoo@gmail.com>2017-06-25 18:29:19 +0200
commit9b82cb1908e2e879ba8fcd067cdfb073c5839932 (patch)
tree340ba24f79c50d3b5dfea764fade632c325635bd /searx/utils.py
parentb50c89f50358c0846c590a3db3dae8d439c08699 (diff)
downloadsearxng-9b82cb1908e2e879ba8fcd067cdfb073c5839932.tar.gz
searxng-9b82cb1908e2e879ba8fcd067cdfb073c5839932.zip
[fix] is_valid_lang fixed for new languages.py + dictzone engine encoding
Diffstat (limited to 'searx/utils.py')
-rw-r--r--searx/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 498f8d0bf..3df571160 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -295,12 +295,12 @@ def is_valid_lang(lang):
if is_abbr:
for l in language_codes:
if l[0][:2] == lang.lower():
- return (True, l[0][:2], l[1].lower())
+ return (True, l[0][:2], l[3].lower())
return False
else:
for l in language_codes:
if l[1].lower() == lang.lower():
- return (True, l[0][:2], l[1].lower())
+ return (True, l[0][:2], l[3].lower())
return False