summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-22 00:59:18 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-22 00:59:18 +0100
commit852dfc77c652fcd5557b097d37a3b5b5543391f9 (patch)
tree324d88ed4f06b5accdcaf1604b5669c73299c2b0 /searx/templates
parenta6c31ef7e64f6365192753c938d63eac527cd32a (diff)
[enh] configurable localization
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/categories.html2
-rw-r--r--searx/templates/preferences.html16
2 files changed, 14 insertions, 4 deletions
diff --git a/searx/templates/categories.html b/searx/templates/categories.html
index b1fd3d1fc..57e63c85d 100644
--- a/searx/templates/categories.html
+++ b/searx/templates/categories.html
@@ -1,7 +1,7 @@
<div id="categories">
{% for category in categories %}
<div class="checkbox_container">
- <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ category }}</label>
+ <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
</div>
{% endfor %}
</div>
diff --git a/searx/templates/preferences.html b/searx/templates/preferences.html
index d47dd4834..3c2afef21 100644
--- a/searx/templates/preferences.html
+++ b/searx/templates/preferences.html
@@ -5,15 +5,25 @@
<h2>{{ _('Preferences') }}</h2>
+ <form method="post" action="/preferences" id="search_form">
<fieldset>
<legend>{{ _('Default categories') }}</legend>
- <form method="post" action="/preferences" id="search_form">
<p>
{% include 'categories.html' %}
</p>
- <input type="submit" value="{{ _('save') }}" />
- </form>
</fieldset>
+ <fieldset>
+ <legend>{{ _('Interface language') }}</legend>
+ <p>
+ <select name='locale'>
+ {% for locale_id,locale_name in locales.items() %}
+ <option value={{ locale_id }} {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name}}</option>
+ {% endfor %}
+ </select>
+ </p>
+ </fieldset>
+ <input type="submit" value="{{ _('save') }}" />
+ </form>
<div class="right"><a href="/">{{ _('back') }}</a></div>
</div>
{% endblock %}