{# ============================================================ #} {# #} {# #} {# Modal-based alternative to #} {# (which uses a dropdown). A ghost globe button opens a native #} {# holding a responsive, tappable grid of languages — #} {# comfortable on both phones and desktops. #} {# #} {# Props: #} {# id – dialog id (default "languageModal"); override when #} {# placing more than one instance on a page. #} {# size – sm|md|lg for the globe button, matching c-button's #} {# own sizes. Unset leaves it at c-button's default. #} {# Set it where the button sits beside another control #} {# that is sized, so the two match — the sidebar #} {# footer pairs it with the theme control at "sm". #} {# ============================================================ #} {% load i18n %} {% if request.LANGUAGE_CODE %} {% get_current_language as CURRENT_LANGUAGE %} {% get_available_languages as LANGUAGES %} {% url "set_language" as set_language_url %} {% if set_language_url %}
{% csrf_token %}
{% for code, name in LANGUAGES %} {% get_language_info for code as info %} {% if code == CURRENT_LANGUAGE %} {% else %} {% endif %} {% endfor %}
{% endif %} {% endif %}