Skip to content

Render alternate urls for localized entries#41

Merged
martyf merged 5 commits intomitydigital:mainfrom
daun:feat/alternate-urls
Apr 6, 2026
Merged

Render alternate urls for localized entries#41
martyf merged 5 commits intomitydigital:mainfrom
daun:feat/alternate-urls

Conversation

@daun
Copy link
Copy Markdown
Contributor

@daun daun commented Apr 2, 2026

Render link tags for localized entries. Uses the full locale (en-UK, not en).

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://www.example.com/english/page.html</loc>
    <xhtml:link
               rel="alternate"
               hreflang="de-DE"
               href="https://www.example.de/deutsch/page.html"/>
    <xhtml:link
               rel="alternate"
               hreflang="en-UK"
               href="https://www.example.com/english/page.html"/>
  </url>
</urlset>

Comment thread src/Support/Sitemapamic.php
@martyf martyf merged commit 1353469 into mitydigital:main Apr 6, 2026
@martyf
Copy link
Copy Markdown
Contributor

martyf commented Apr 6, 2026

Thanks for this - have tagged with 3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants