Skip to content

Commit

Permalink
[Core] Introduce x-default for default locale
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Nov 11, 2022
1 parent 3f522ec commit c3d81c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/templates/page/page_default.html.twig
Expand Up @@ -29,9 +29,9 @@

{% block alternate_language %}
{% if page.locale is not null %}
<link rel="alternate" hreflang="{{ page.locale }}" href="{{ page(page, true) }}"/>
<link rel="alternate" hreflang="{{ page.locale == apps.get().defaultLocale ? 'x-default' : page.locale }}" href="{{ page(page, true) }}"/>
{% for translation in page.translations %}
<link rel="alternate" hreflang="{{ translation.locale }}" href="{{ page(translation, true) }}"/>
<link rel="alternate" hreflang="{{ translation.locale == apps.get().defaultLocale ? 'x-default' : translation.locale }}" href="{{ page(translation, true) }}"/>
{% endfor %}
{% endif %}
{% endblock %}
Expand Down

0 comments on commit c3d81c5

Please sign in to comment.