{% for language in languages %}
  {% if language.code == code %}
    <a href="{{ language.code }}" class="nav-link dropdown-toggle" data-bs-toggle="dropdown"><img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}"/></a>
  {% endif %}
{% endfor %}
<ul class="dropdown-menu">
  {% for language in languages %}
    <li><a href="{{ language.code }}" class="dropdown-item"><img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}"/> {{ language.name }}</a></li>
  {% endfor %}
</ul>
<input type="hidden" name="redirect" value="{{ redirect }}" id="input-redirect"/>