{% extends "base.html" %}}{% load i18n parler_tags %} {% block headtitle %}{{ article.title }}{% endblock %} {% block main %}
Current language: {{ article.language_code }}
Available languages: {% comment %} generate URLs per language. This is less efficient compared to the example in admin/article/change_form.html as this performs a query per language. However, it shows the capabilities of this package very well. {% endcomment %} {% for language_code in article.get_available_languages %} {% get_language_info for language_code as lang %} {% get_translated_url language_code article as tr_url %} {% if tr_url %} {{ lang.name_local }} {% endif %} {% endfor %}
{% endblock %}