Fr: translations

This commit is contained in:
2019-04-23 23:08:31 +05:30
parent d24d07bb07
commit 46270470fc
8 changed files with 90 additions and 16 deletions

View File

@ -0,0 +1,16 @@
{% macro translations_for(article) %}
{% if article.translations %}
{{ gettext('Translation:') }}
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% 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 %}