Quartz knows one language per site — one locale in the configuration, and that is that.
quartz-multilanguage adds everything missing to publish the same notes from one vault in several
languages: it detects each page’s language, finds the translations of one another, brings a
switcher, writes hreflang and og:locale, redirects the start page and tells a visitor when their
language exists.
What it does
Detect every page's language
By the language folder (
en/…), by a suffix in the file name (note.en.md) or by a frontmatter field — in the order you set. → 2
Find the translations of one another
Through a shared key in the frontmatter, through Obsidian aliases (compatible with the Obsidian plugin “Multilingual”) or simply through the same path. → 3
A switcher
As text links, as a drop-down without JavaScript or as flags; labelled with the language code, the name, the native name or the title of the translation. It leads to the translation of this page. → 4
What search engines need to know
<html lang>,hreflangwithx-defaultandog:localeare right on every page. → 5
Visitors land in their language
One site for all languages, or one per language
The usual case is one build with every language. Anyone wanting an address of their own per language builds only the ones needed. → 8
This site is its own evidence
It exists in German and English, out of one vault, with this plugin. The switcher at the top right is its component; change the language and you land on the translation of this page — except on the tag pages, which have no counterpart. There it takes you to the other language’s start page, and says so in the tooltip.
The nine chapters
| Chapter | The question it answers |
|---|---|
| 1 – Getting started | What Quartz does alone, and what is added here |
| 2 – Detection | How does a page know which language it is in? |
| 3 – Linking | How do two versions of one page find each other? |
| 4 – The switcher | What the change looks like, and what it says |
| 5 – Addresses and metadata | What search engines learn about the multilingualism |
| 6 – Redirects | Where does / lead, and what happens when a translation is missing? |
| 7 – Notices and links | “This page is also available in …” — and links that change language |
| 8 – Building | One site for all languages, or one per language? |
| 9 – Reference | Every option, every limit |
In one minute
npx quartz plugin add github:boxi-os/quartz-multilanguageOne entry configures everything at once — detection, linking, switcher:
plugins:
- source: github:boxi-os/quartz-multilanguage
enabled: true
order: 65
options:
languages:
- { code: de, native: Deutsch, locale: de-DE }
- { code: en, native: English, locale: en-US }
defaultLanguage: de
layout:
position: header
group: toolbarAt length under [[en/1-getting-started/02-your-first-bilingual-site|1.2 – Your first bilingual site]].
Where else it is written
The short version is the repository README. The sister plugin quartz-layout-box puts markup into the layout and works well alongside this one; both belong to QuartzControl, though the app is not required.