summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2016-11-14 22:32:40 +0100
committerNoémi Ványi <sitbackandwait@gmail.com>2016-11-14 23:32:19 +0100
commit299c8823045a269c83d19cb6d05b24ef334207af (patch)
treefa29ffbc182da021c6a5adfa0cb4d1ec2b508dd4 /searx
parent12c369e858b45b4904ab079c3aefebaa18e7ece4 (diff)
downloadsearxng-299c8823045a269c83d19cb6d05b24ef334207af.tar.gz
searxng-299c8823045a269c83d19cb6d05b24ef334207af.zip
search: make language configurable from settings.yml
Diffstat (limited to 'searx')
-rw-r--r--searx/preferences.py3
-rw-r--r--searx/settings.yml1
-rw-r--r--searx/settings_robot.yml1
3 files changed, 4 insertions, 1 deletions
diff --git a/searx/preferences.py b/searx/preferences.py
index 045f0e8c6..4436b8fe8 100644
--- a/searx/preferences.py
+++ b/searx/preferences.py
@@ -216,7 +216,8 @@ class Preferences(object):
super(Preferences, self).__init__()
self.key_value_settings = {'categories': MultipleChoiceSetting(['general'], choices=categories),
- 'language': EnumStringSetting('all', choices=LANGUAGE_CODES),
+ 'language': EnumStringSetting(settings['search']['language'],
+ choices=LANGUAGE_CODES),
'locale': EnumStringSetting(settings['ui']['default_locale'],
choices=settings['locales'].keys() + ['']),
'autocomplete': EnumStringSetting(settings['search']['autocomplete'],
diff --git a/searx/settings.yml b/searx/settings.yml
index 573cf5458..733341c31 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -5,6 +5,7 @@ general:
search:
safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict
autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "wikipedia" - leave blank to turn it off by default
+ language : "all"
server:
port : 8888
diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml
index 43dc9b00a..7d2701449 100644
--- a/searx/settings_robot.yml
+++ b/searx/settings_robot.yml
@@ -5,6 +5,7 @@ general:
search:
safe_search : 0
autocomplete : ""
+ language: "all"
server:
port : 11111