- <link rel="canonical" href="{{ canonical }}"{% if app.request.locale is defined and app.request.locale %} hreflang="{{ app.request.locale }}"{% endif %} />
+ <link rel="canonical" href="{{ canonical }}"{% if locale is defined and locale %} hreflang="{{ locale }}"{% endif %} />
{% endif %}
{% if alternates is defined and alternates %}
{% for lang, alternate in alternates %}
<link rel="alternate" href="{{ alternate.absolute }}" hreflang="{{ lang }}" />