Skip to content
Multi-language

Multi-language

List the languages in locales (first entry is the default and drives the listing pages and RSS):

blogTheme({ locales: ["en", "de"] })

Layout

One folder per post, one file per language named after the locale. Each file sets its own urlSlug (defaults to the folder name) — the slug carries the language, there is no /en/ URL prefix:

src/content/blog/hello-world/
  en.md   #                    ->  /blog/hello-world/
  de.md   # urlSlug: hallo-welt -> /blog/hallo-welt/

The folder path links the translations (override with translationKey). Posts of every language live under /blog/<slug>/; a post page carries hreflang alternates and a header language switcher that jumps to the translation.

Per-language feeds

With more than one locale, each language gets its own feed at /rss/<locale>.xml (/rss.xml stays the default-language feed), and every page advertises them with <link rel="alternate" type="application/rss+xml">.

The listing routes (/blog, /tags, /series, /gallery, /llms.txt, /search.json) and your own custom pages show the default language only.