{% macro translations_for(article) %}
    {% if article.translations %}
        {{ _('Traducciones:') }}
        {% for translation in article.translations %}
            <a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ LANGUAGE_CODES[translation.lang] }}</a>{% if not loop.last %},{% endif %}
        {% endfor %}
    {% endif %}
{% endmacro %}

{% macro entry_hreflang(entry) %}
    {% if entry.translations %}
        {% for translation in entry.translations %}
            <link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
        {% endfor %}
    {% endif %}
{% endmacro %}
