How to choose a language as country flags in Django-cms?

Well, the question is in the title. Is it even possible? I can use css to make the links look like flags, it’s easy, but there is also text (English, French, German, etc.). Ok, I will be grateful for any help.

+3
source share
2 answers

Ok, I did it (all of a sudden someone finds it useful). You should modify the language_chooser.html file as follows:

{% load cms_tags i18n %}
{% for language in languages %}
<a href="{% page_language_url language.0 %}"{% ifequal lang language.0 %} class="current"{% endifequal %}><img src="{{ MEDIA_URL }}[path to your flags images]{{ language.0 }}.gif" /></a>
{% endfor %}
+3
source

Using flags to represent languages ​​is usually not a good idea. Since the W3C puts it :

Do not use flag icons to indicate languages.

, . , , . .

., , http://www.cs.tut.fi/~jkorpela/flags.html.

+18

Source: https://habr.com/ru/post/1735241/


All Articles