summaryrefslogtreecommitdiff
path: root/searx/locales.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-08-14 14:35:09 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2022-08-14 14:35:09 +0200
commitac7776663b801414f7a4e96c49eeab3ca92c659d (patch)
tree0d6ef71b0b46e80ae633f9399dd42c2dcc8f586e /searx/locales.py
parent649d1a144de332c87c7e2dd3de78e28968472b56 (diff)
downloadsearxng-ac7776663b801414f7a4e96c49eeab3ca92c659d.tar.gz
searxng-ac7776663b801414f7a4e96c49eeab3ca92c659d.zip
[fix] typo in get_engine_locale
Due to a typo in get_engine_locale, a language selection like `!qw :de siemens` did not work. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/locales.py')
-rw-r--r--searx/locales.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/locales.py b/searx/locales.py
index a7c037aa0..b7c0badd9 100644
--- a/searx/locales.py
+++ b/searx/locales.py
@@ -217,7 +217,7 @@ def get_engine_locale(searxng_locale, engine_locales, default=None):
locale = babel.Locale.parse(searxng_locale, sep='-')
except babel.core.UnknownLocaleError:
try:
- locale = babel.Locale.parse(searxng_locale.split('-')[1])
+ locale = babel.Locale.parse(searxng_locale.split('-')[0])
except babel.core.UnknownLocaleError:
return default