diff options
author | marc <a01200356@itesm.mx> | 2016-12-13 23:51:15 -0600 |
---|---|---|
committer | marc <a01200356@itesm.mx> | 2016-12-13 23:51:15 -0600 |
commit | e0c270bd72f7b2a40222e3ed264e25d36cb0fc30 (patch) | |
tree | 2a0d67f6d5874350baf0ec6733e1e1241df2ad1f /searx/engines/duckduckgo.py | |
parent | 1b46ecd21a15cdea4234a568e9ac973bb6b65b8a (diff) | |
download | searxng-e0c270bd72f7b2a40222e3ed264e25d36cb0fc30.tar.gz searxng-e0c270bd72f7b2a40222e3ed264e25d36cb0fc30.zip |
tests for language support in engines
Diffstat (limited to 'searx/engines/duckduckgo.py')
-rw-r--r-- | searx/engines/duckduckgo.py | 6 |
1 files changed, 4 insertions, 2 deletions
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: |