options:
missingTranslationNotice: true
availableTranslationNotice: true| Option | When the sentence appears | What it says |
|---|---|---|
missingTranslationNotice | The visitor speaks a language this page does not exist in | “This page is only available in English.” |
availableTranslationNotice | It also exists in their language | “This page is also available in German.” — with a link |
The second is the more important one: it catches the visitor who arrived in the wrong language through a search engine. This site has it switched on; on a German page with an English browser it sits above the text.
Why this is decided in the browser
Which language somebody prefers is known only to their browser. At build time it is not known, and a page cannot be shipped in two versions at once.
The plugin therefore puts an empty, hidden callout at the top of every page. The script compares the page’s language with the visitor’s preferred one — remembered choice, else browser language — and fills in the matching text. If nothing matches, the box stays empty and invisible.
The text is in the visitor's language
Somebody who speaks German and lands on an English page reads “Diese Seite gibt es auch auf Deutsch” — in German. That is the point: the sentence addresses somebody who may not read the page’s language.
The plugin carries the texts for en-US, de-DE, fr-FR and es-ES; other languages fall back to
English.
Why they never reach the search index
Because the box is empty at build time. The text comes into being in the browser and therefore reaches neither the page description nor the search index. Both would otherwise be polluted with a sentence that is not part of the content at all.
Appearance
The box carries the class callout and so takes on the look of Obsidian callouts when that plugin is
active. Without it, it is a plain box that can be styled through .multilanguage-notice.