From 8cd6c6cdd1d8febaf138241868d60a7b4582d581 Mon Sep 17 00:00:00 2001 From: Nivesh Krishna Date: Thu, 17 Nov 2022 17:07:32 +0530 Subject: [PATCH] fix language selector for engine --- searx/engines/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index 79bdfbc07..49f478440 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -110,7 +110,9 @@ def load_engine(engine_data): sys.exit(1) # assign supported languages from json file - if engine_data['engine'] in ENGINES_LANGUAGES: + if engine_data['name'] in ENGINES_LANGUAGES: + setattr(engine, 'supported_languages', ENGINES_LANGUAGES[engine_data['name']]) + elif engine_data['engine'] in ENGINES_LANGUAGES: setattr(engine, 'supported_languages', ENGINES_LANGUAGES[engine_data['engine']]) # find custom aliases for non standard language codes -- GitLab