summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2022-03-28 21:36:20 +0200
committerGitHub <noreply@github.com>2022-03-28 21:36:20 +0200
commit0379856712ced64f9fa039d4cb77ff3532b85536 (patch)
treeb75ba0ff34af5b197d60d23d7259ca877b462909 /searx/templates
parentdec04c0ed640caac3b901787aca2a14452734fe7 (diff)
parent2e4557f3f3de4d423b4ef1fb0e51a98948a79e31 (diff)
downloadsearxng-0379856712ced64f9fa039d4cb77ff3532b85536.tar.gz
searxng-0379856712ced64f9fa039d4cb77ff3532b85536.zip
Merge pull request #967 from return42/language-filter
[mod] add flags to the languages filter
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/oscar/languages.html2
-rw-r--r--searx/templates/simple/filters/languages.html4
-rw-r--r--searx/templates/simple/preferences.html4
3 files changed, 5 insertions, 5 deletions
diff --git a/searx/templates/oscar/languages.html b/searx/templates/oscar/languages.html
index 0846caa96..c0ecb440e 100644
--- a/searx/templates/oscar/languages.html
+++ b/searx/templates/oscar/languages.html
@@ -2,7 +2,7 @@
<label class="visually-hidden" for="language">{{ _('Language') }}</label>
<select class="language form-control {{ custom_select_class(rtl) }}" id="language" name="language" accesskey="l">
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
-{%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
+{%- for lang_id,lang_name,country_name,english_name,flag in language_codes | sort(attribute=1) -%}
<option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
{{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
</option>
diff --git a/searx/templates/simple/filters/languages.html b/searx/templates/simple/filters/languages.html
index 0e778ebae..e9e4d47ce 100644
--- a/searx/templates/simple/filters/languages.html
+++ b/searx/templates/simple/filters/languages.html
@@ -1,8 +1,8 @@
<select class="language" id="language" name="language" aria-label="{{ _('Search language') }}">{{- '' -}}
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
- {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
+ {%- for lang_id,lang_name,country_name,english_name,flag in language_codes | sort(attribute=1) -%}
<option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>
- {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id -}}
+ {% if flag %}{{ flag }} {% endif%} {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}
</option>
{%- endfor -%}
</select>
diff --git a/searx/templates/simple/preferences.html b/searx/templates/simple/preferences.html
index 2ef83757b..fef003d5e 100644
--- a/searx/templates/simple/preferences.html
+++ b/searx/templates/simple/preferences.html
@@ -116,8 +116,8 @@
<p class="value">{{- '' -}}
<select name='language' aria-labelledby="pref_language" aria-describedby="desc_language">{{- '' -}}
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
- {%- for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) -%}
- <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} {% if country_name %}({{ country_name }}) {% endif %}- {{ lang_id }}</option>
+ {%- for lang_id,lang_name,country_name,english_name,flag in language_codes | sort(attribute=1) -%}
+ <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{% if flag %}{{ flag }} {% endif%} {{- lang_name }} {% if country_name %}({{ country_name }}) {% endif %}</option>
{%- endfor -%}
</select>{{- '' -}}
</p>