From e0c270bd72f7b2a40222e3ed264e25d36cb0fc30 Mon Sep 17 00:00:00 2001 From: marc Date: Tue, 13 Dec 2016 23:51:15 -0600 Subject: tests for language support in engines --- searx/engines/duckduckgo.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'searx/engines/duckduckgo.py') diff --git a/searx/engines/duckduckgo.py b/searx/engines/duckduckgo.py index d37d2778b..9cf5fb339 100644 --- a/searx/engines/duckduckgo.py +++ b/searx/engines/duckduckgo.py @@ -53,14 +53,16 @@ def request(query, params): locale = None elif params['language'][:2] == 'ja': locale = 'jp-jp' + elif params['language'][:2] == 'sl': + locale = 'sl-sl' elif params['language'] == 'zh-TW': locale = 'tw-tzh' elif params['language'] == 'zh-HK': locale = 'hk-tzh' elif params['language'][-2:] == 'SA': - locale = 'xa' + params['language'].split('-')[0] + locale = 'xa-' + params['language'].split('-')[0] elif params['language'][-2:] == 'GB': - locale = 'uk' + params['language'].split('-')[0] + locale = 'uk-' + params['language'].split('-')[0] else: locale = params['language'].split('-') if len(locale) == 2: -- cgit v1.2.3-54-g00ecf