English
About this handbook

This handbook belongs to the Quartz plugin quartz-multilanguage. And it is built with it: the switcher at the top right comes from there.

This box, too, appears twice in the configuration — once per language.

9.2 – Explorer and Quartz

Filtering the explorer

Left alone, the explorer shows both language trees. Anyone wanting one per language needs a filter function — and the explorer plugin takes one only through quartz.ts, not through quartz.config.yaml.

// quartz.ts
import { languageExplorerFilter } from "./.quartz/plugins/quartz-multilanguage";
 
Explorer({ filterFn: languageExplorerFilter("de", { languages: ["de", "en"] }) });

Why this cannot go in the configuration

YAML cannot hold a function. Anything Quartz takes as a function has to go through quartz.ts — that is a property of Quartz, not a decision of this plugin.

Where the line runs

The pluginQuartz
detects the language per pagerenders <html lang> from it
links translationsknows nothing about them
renders the switcherprovides the place in the layout
writes hreflang and og:localewrites the rest of the head
filters languages out of the buildbuilds what remains
—translates its own interface texts according to locale

The last line is where most questions hang: what Quartz contributes in words follows the site-wide locale, not the page’s language. That is not a gap in the plugin but the place where its remit ends — the way out is one build per language (8.2).

What every page carries

fileData.multilanguage = { lang, baseSlug, source, translationKey, translations }

Anyone writing their own components finds everything the plugin knows about a page there.