---
title: "Language switcher best practices for multilingual sites"
description: "Where to put a language switcher, dropdown or links, native names, flags, redirects and accessible markup, with the HTML a WordPress site can ship."
url: "https://www.langrelay.com/blog/language-switcher-best-practices"
---

1. [Home](https://www.langrelay.com/)
2. [Blog](https://www.langrelay.com/blog)
3. Language switcher best practices for multilingual sites

ArticleWordPress

# Language switcher best practices for multilingual sites

Where to put a language switcher, dropdown or links, native names, flags, redirects and accessible markup, with the HTML a WordPress site can ship.

[Chris Jayden](https://www.langrelay.com/about)

Founder

Published

6 October 2026

Updated

16 October 2026

Reading time

9 min read

![Two people in a long canoe wave to a stilted riverside village whose dock railing is painted with green and orange leaf tiles.](https://www.langrelay.com/_emdash/api/media/file/01M4ET6KSFZJ2D1QP687NRYCVM.webp)

On this page

1. Where to put the language switcher
2. Dropdown or a row of links
3. Write each language in its own language
4. Should a language switcher use flags?
5. Link to the same page in the other language
6. Don't force a redirect by browser language
7. Markup that people and crawlers can use
8. How LangRelay's WordPress switcher does it
9. A short checklist

A language switcher works when a visitor finds it in the first place they look, recognises their own language in it, and lands on the same page in that language. In practice that means a control in the header (and again in the footer), each language written in its own language, flags only next to a name, plain links to the translated version of the current page, and no forced redirect based on the browser.

## Where to put the language switcher

Put it in the top corner of the header on desktop. Nielsen Norman Group's guidance on ecommerce language switchers says exactly that, and adds that on mobile it should sit above the fold or inside the navigation menu. A visitor who cannot read your page has little reason to scroll through it looking for a control.

Repeat it in the footer. Smashing Magazine's checklist puts the selector in the header as well as the footer, which catches the visitor who reaches the bottom of a long page and only then decides to switch.

One failure to check for on mobile is a switcher that exists on desktop and disappears when the header collapses into a menu button. If the menu is the only place it lives, put it near the top of the menu, where it is visible without opening any submenu.

A floating button in a bottom corner is a reasonable fallback when a theme gives you nowhere else to put the control. It is easy to miss on a busy page and it competes with chat widgets and cookie banners, so treat it as a fallback and place a switcher in the header when you can.

## Dropdown or a row of links

A dropdown makes sense once the list gets long. With two to four languages, showing every option as a link saves a click and still fits: `English · Deutsch · Español` fits in most headers.

Past five or six languages a collapsed control is easier to scan. Build it as a disclosure: a button that shows and hides a list of links. The W3C's ARIA Authoring Practices Guide describes the pattern, and when the list is open the button carries `aria-expanded="true"`. The same guide's example of disclosure navigation explains why it does not use the `menu` role: site navigation does not need the complex keyboard behaviour that assistive technology expects from an application menu. A language list is site navigation, so a disclosure is the right fit.

Avoid the native `<select>` element that changes page on selection. It usually relies on JavaScript to turn a choice into a page change, and Google's link guidance says it can generally only crawl a link if it is an `<a>` element with an `href`. A select box gives the crawler no links to your translations. If you do use one, the W3C's note on using `<select>` for localized content still asks for each option to be written in its own language, as in "français".

## Write each language in its own language

Label every option with the language's own name: Deutsch, Español, Français, Nederlands. A visitor who reads only German is looking for "Deutsch". If your English page lists "German", you are asking them to read English to escape English. NN/g gives the same advice with "Español instead of Spanish", and Smashing Magazine's version is "Deutsch instead of German".

Mark each name with its language. WCAG success criterion 3.1.2, Language of Parts, uses this exact case as an example: the text of each link is the name of the language in that language, with a `lang` attribute, as in `<a href="..." lang="de">Deutsch</a>`. A screen reader can then pronounce "Deutsch" with German rules. The same Understanding document notes that a screen reader may still read a link name as one flat string, so the attribute does not guarantee correct pronunciation everywhere. It costs nothing to add, though, and it is what the criterion asks for.

Two smaller choices follow from the same rule:

- Avoid two-letter codes such as DE or ES as the only label. Smashing Magazine points out that browser translation tools can translate short codes, and the W3C's note on language lists warns that a list of codes only works when visitors know the tag for their language.
- If your audience is mixed, you can show both names, as in "Deutsch (German)". Keep the native name first.

## Should a language switcher use flags?

Not on their own. The W3C's internationalization note on link destinations puts it plainly: "Don't use flags to indicate languages! Flags represent countries, not languages." Jakob Nielsen named the same problem in 1996, that some languages are spoken in many countries, though his fix was to keep flags and pick the one matching the site's location and main audience. Which flag stands for Spanish? A Mexican visitor shown the Spanish flag, or a Brazilian visitor shown Portugal's, is being told the site was not made with them in mind.

NN/g's 2022 article is more positive about pairing the two: it recommends showing a national flag or currency symbol next to the name as an extra cue, and does not recommend a flag alone. Smashing Magazine says to avoid flags for languages, and Weglot's guide cautions against them while allowing that they can work for some audiences. So the defensible rule is that a name is required and a flag is optional decoration.

Flags make sense when the choice really is a country, such as a store that changes currency, shipping and prices per market. NN/g recommends letting people change language, country and currency separately, and a combined country and language picker should still say which language each option gives you.

## Link to the same page in the other language

When someone switches language on your pricing page, take them to the pricing page in that language, not to the translated home page. Landing on the home page forces them to find their way back to what they were reading, in a language they may only now be able to follow.

That means the switcher's links are different on every page. Each one points to the translated URL of the page the visitor is on. A switcher whose links all point at `/de/`, `/es/` and `/fr/` is easier to build and gives a worse experience.

Decide what happens when a page has no translation yet. You can hide that language on that page, or link to the address where the translation will live and serve the original until it is ready. Whichever you choose, avoid a link that goes to a 404.

## Don't force a redirect by browser language

Google's documentation on multilingual sites is direct about this: avoid automatically redirecting users from one language version to another based on what you think their language may be, and consider adding links to the other versions instead. There is a crawling reason too. Google's page on locale-adaptive pages says Googlebot's default crawler appears to use US-based IP addresses and sends requests without an `Accept-Language` header. A site that decides the language for the visitor can end up showing Google one version and hiding the rest.

Not every guide goes that far. NN/g suggests defaulting to the language that matches the browser's settings, and the W3C's note on guiding users to translated pages recommends server-side content negotiation, together with links on every page to the other languages so people can change their minds. Smashing Magazine lands in the middle: nudging is fine and automatic redirects are not.

The pattern all of these allow is a suggestion. Keep the URL the visitor asked for, and if their browser prefers another language you have, show a dismissible banner in that language with a link to the matching page. Remember the choice they make, and never redirect a URL that someone requested directly, because that URL may be the one a search result or a colleague sent them to.

On WordPress, from plugin 2.10.0, LangRelay suggests by default. On the first page of a visit, when that page is also live in a language the visitor's browser prefers, LangRelay offers the visitor, in their language, the page in that language, and the visitor stays where they are unless they accept. A site owner who wants a redirect can choose one: the visitor is then taken to their language before the page appears, told so, and given a link back. That choice goes against Google's advice above, and the setting says so. In both cases LangRelay never redirects search engine crawlers, only sends people to a page that has a live translation, and never uses the visitor's location. The visitor's answer is kept in their browser for a year and is never sent anywhere.

## Markup that people and crawlers can use

Here is a switcher for a page at `/pricing/` with German and Spanish translations, written as a plain list of links:

```
<nav aria-label="Language">
  <ul>
    <li><a href="https://example.com/pricing/" hreflang="en" lang="en" aria-current="true">English</a></li>
    <li><a href="https://example.com/de/preise/" hreflang="de" lang="de">Deutsch</a></li>
    <li><a href="https://example.com/es/precios/" hreflang="es" lang="es">Español</a></li>
  </ul>
</nav>
```

What each part does:

- `<nav aria-label="Language">` lets screen reader users jump straight to the control from a landmarks list.
- Each option is an `<a>` with an `href`, so crawlers can follow it and it works with no JavaScript at all.
- `hreflang` on a link tells the browser the language of the page at the other end. MDN describes it as a hint with no built-in functionality, and the HTML Standard calls it purely advisory. It does not replace the `<link rel="alternate" hreflang>` tags in the page head that search engines read.
- `lang` on each link marks the label's own language, the WCAG 3.1.2 case above.
- `aria-current="true"` marks the language the visitor is reading now, so it is announced as current and can be styled differently.

If you collapse this into a disclosure for a long list, wrap the same `<ul>` in a container that a `<button aria-expanded="false">` shows and hides. The links stay in the HTML whether the list is open or closed.

## How LangRelay's WordPress switcher does it

I build LangRelay, and its WordPress plugin ships a switcher that follows most of the rules above. You can add it as a Gutenberg block, as an Elementor widget or with the `[langrelay_switcher]` shortcode. If you place none of those, a floating switcher appears in the bottom right corner once your first language is live, and it stays out of the way once you place one of your own.

The switcher is rendered on the server as a `<nav aria-label="Language">` holding a list of `<a>` links, each with `href`, `hreflang` and `lang`, and `aria-current="true"` on the current language. It works without JavaScript, and crawlers see the links. Each link points to the translated address of the page the visitor is on. When a page has no approved translation in a language yet, the link goes to that page's path under the language prefix (for example `/de/pricing/`), which serves the original until a translation is approved.

By default it shows a flag and the native language name together. You can turn off the flag, or show English names in place of native ones. If you turn off both the flag and the name, the plugin brings the name back, so it never renders a flag-only switcher. The switcher only changes language when someone clicks it. From plugin 2.10.0, visitors whose browser prefers another of your languages are also offered that version, or taken to it if you choose, as the section on redirects describes, and nobody is sent anywhere because of their location.

There are things it does not do. It renders a horizontal list of links and has no built-in dropdown, so a site with many languages styles the list itself, using the plugin's CSS classes. It has no focus styles of its own, so it relies on your theme's focus outline. The [language switcher page](https://www.langrelay.com/language-switcher) has more on the feature, and the [guide to translating a WordPress site](https://www.langrelay.com/guides/translate-wordpress-site) covers where the switcher fits in a full setup.

## A short checklist

- The switcher is in the header on desktop and visible near the top of the mobile menu, and it is repeated in the footer.
- Every option is labelled with the language's own name and carries a matching `lang` attribute.
- No option is a flag alone.
- Each option is an `<a href>` to the same page in that language.
- A long list collapses into a disclosure button with `aria-expanded`, not a `<select>`.
- The current language is marked with `aria-current`.
- Nobody is redirected because of their browser or IP address; a dismissible suggestion is the most a site does on its own.
- Pages without a translation have a defined behaviour that never ends in a 404.

If you are still choosing how to translate the site itself, the [comparison of WordPress translation plugins](https://www.langrelay.com/blog/best-wordpress-translation-plugins) covers how each one handles languages, and [the two ways WordPress plugins store translations](https://www.langrelay.com/blog/wordpress-multilingual-without-duplicating-pages) explains how that choice changes the work after every edit. If you would like to see the switcher on your own site, you can [book a demo](https://www.langrelay.com/book-a-demo).

## Sources

The pages this one cites, with the day each was read.

1. 01[6 Tips for Improving Language Switchers on Ecommerce Sites (Nielsen Norman Group, 2022)](https://www.nngroup.com/articles/language-switching-ecommerce/)nngroup.com, checked 6 October 2026
2. 02[Designing A Perfect Language Selector UX (Smashing Magazine, 2022)](https://www.smashingmagazine.com/2022/05/designing-better-language-selector/)smashingmagazine.com, checked 6 October 2026
3. 03[Website Language Selector, 15 Examples and Best Practices (Weglot blog)](https://www.weglot.com/blog/website-language-selector)weglot.com, checked 6 October 2026
4. 04[Indicating the language of a link destination (W3C Internationalization)](https://www.w3.org/International/questions/qa-link-lang)w3.org, checked 6 October 2026
5. 05[Guiding users to translated pages (W3C Internationalization)](https://www.w3.org/International/questions/qa-site-conneg)w3.org, checked 6 October 2026
6. 06[Flag Problems (Nielsen Norman Group, 1996)](https://www.nngroup.com/articles/flag-problems/)nngroup.com, checked 6 October 2026
7. 07[Using select to link to localized content (W3C Internationalization)](https://www.w3.org/International/questions/qa-navigation-select)w3.org, checked 6 October 2026
8. 08[Understanding Success Criterion 3.1.2, Language of Parts (W3C WAI)](https://www.w3.org/WAI/WCAG22/Understanding/language-of-parts.html)w3.org, checked 6 October 2026
9. 09[Disclosure (Show/Hide) Pattern (W3C ARIA Authoring Practices Guide)](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/)w3.org, checked 6 October 2026
10. 10[Disclosure navigation menu example (W3C ARIA Authoring Practices Guide)](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/)w3.org, checked 6 October 2026
11. 11[Managing Multi-Regional and Multilingual Sites (Google Search Central)](https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites)developers.google.com, checked 6 October 2026
12. 12[How Google Crawls Locale-Adaptive Pages (Google Search Central)](https://developers.google.com/search/docs/specialty/international/locale-adaptive-pages)developers.google.com, checked 6 October 2026
13. 13[SEO Link Best Practices for Google (Google Search Central)](https://developers.google.com/search/docs/crawling-indexing/links-crawlable)developers.google.com, checked 6 October 2026
14. 14[<a>: The Anchor element (MDN)](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a)developer.mozilla.org, checked 6 October 2026
15. 15[HTML Standard, links, the hreflang attribute (WHATWG)](https://html.spec.whatwg.org/multipage/links.html#attr-hyperlink-hreflang)html.spec.whatwg.org, checked 6 October 2026

[Chris Jayden](https://www.langrelay.com/about)

Founder, LangRelay

Chris Jayden is the founder of LangRelay. Chris has worked on websites of every size, from large e-commerce stores to small sites with a handful of pages, and started LangRelay after years of translating them the hard way.

On this page

1. Where to put the language switcher
2. Dropdown or a row of links
3. Write each language in its own language
4. Should a language switcher use flags?
5. Link to the same page in the other language
6. Don't force a redirect by browser language
7. Markup that people and crawlers can use
8. How LangRelay's WordPress switcher does it
9. A short checklist

Share

- [Share on LinkedIn (opens in a new tab)](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fwww.langrelay.com%2Fblog%2Flanguage-switcher-best-practices)
- [Share on X (opens in a new tab)](https://x.com/intent/post?url=https%3A%2F%2Fwww.langrelay.com%2Fblog%2Flanguage-switcher-best-practices&amp;text=Language%20switcher%20best%20practices%20for%20multilingual%20sites)

See it on your site

A 30-minute walkthrough on one of your pages.

[Book a demo](https://www.langrelay.com/book-a-demo)

- accessibility
- language switcher
- multilingual SEO
- ux
- WordPress

Book a demo

## See LangRelay on your own site

Book 30 minutes with the team. We translate one of your pages live and walk through review, publishing and multilingual SEO.

[Book a demo](https://www.langrelay.com/book-a-demo)[See pricing](https://www.langrelay.com/pricing)
