{% extends "base.html" %}}{% load i18n parler_tags %}

{% block headtitle %}{{ article.title }}{% endblock %}

{% block main %}
  <h1>{{ article.title }}</h1>

  {{ article.content|linebreaks }}

  <hr/>
  <p>Current language: {{ article.language_code }}</p>
  <p>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 %}
        <a href="{{ tr_url }}" title="{{ language_code }}">{{ lang.name_local }}</a>
      {% endif %}
    {% endfor %}

  </p>
{% endblock %}
