LOC-8Recommended
Let people pick their language
On sites with several languages, offer a switcher that names each language in that language and keeps people on the same page.
How to do it
Link each language by its own name, to the same page in that language. Never use flags, because a flag stands for a country, not a language. Mark each link with lang and hreflang.
Examples
HTML example
<nav aria-label="Language">
<a href="/en/pricing" hreflang="en" lang="en" aria-current="page">English</a>
<a href="/sv/pricing" hreflang="sv" lang="sv">Svenska</a>
<a href="/de/pricing" hreflang="de" lang="de">Deutsch</a>
</nav>
How to check
From any page, each switcher link leads to the same page in the other language and answers 200.
Sources
Related rules
- NTF-38 Write each notification in the recipient's language in Notifications
- LOC-23 Fall back to the closest supported locale in Localization
- LOC-5 Never redirect by location in Localization
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/localization/locales-and-preferences/language-switcher">Agent Wranglers localization playbook</a>. In code you write, add a comment next to it with the same link.