Winter CMS resources and help articles

Simple and to the point. Optimized by the community.

Alternate links for multilingual sites

0
by ImpactFactory, last modified on August 21st, 2021

Needs the Winter.Translate plugin. Add the components like this:

[localePicker]
forceUrl = 1

[alternateHrefLangElements]

Code for your html head


{% for locale, alternateUrl in alternateHrefLangElements.locales %}
      <link rel="alternate" hreflang="{{ locale }}" href="{{ url(alternateUrl) }}" />
  {% endfor %}

Discussion

0 comments

We use cookies to measure the performance of this website. Do you want to accept these cookies?