The normal case on a growing site: the page exists in English, the German one is still missing. What should the switcher say?
options:
switcher:
missing: homemissing | What happens | Price |
|---|---|---|
home | The entry leads to that language’s start page | The click goes somewhere other than expected — the tooltip says so, but not everyone reads it |
hide | The entry is absent | The switcher changes length from page to page, and nobody learns the language exists |
disabled | The entry is there, greyed out, without a link | Honest, but a dead entry taking up room |
The default is home — at least it leads to where the language begins.
What the switcher emits for it
A fallback entry gets a class of its own and a tooltip:
<a href="../fr/" class="fallback" hreflang="fr-FR" lang="fr-FR"
data-lang="fr" title="Français (start page)">Français</a>Through .multilanguage-switcher .fallback it can be set apart in the site’s CSS — italic, paler,
with a mark after it. That takes the sting out of home without making the entry disappear.
The alternative: redirects
If home is too vague, you can instead make sure the address exists at all: fallbackPages: redirect creates a redirect page for every missing translation, leading to the version that does
exist. The click then goes to de/coffee, lands on en/coffee, and the address works as a bookmark
too. See 6.2 – Missing pages.
And the notice
The other way round: when a visitor lands on the English page although they speak German, and the German version exists — they should learn about it without searching the switcher. That is what the notices in chapter 7 are for.