From ac7776663b801414f7a4e96c49eeab3ca92c659d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Sun, 14 Aug 2022 14:35:09 +0200 Subject: [PATCH] [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 --- searx/locales.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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