Skip to content

Languages

Every template is ready for more languages. It ships in English, and you can add any language without changing code: the pages, the language switcher, search engine hints and the CMS follow.

  1. Add it to src/i18n/locales.json:

    {
    "default": "en",
    "locales": [
    { "code": "en", "label": "English" },
    { "code": "de", "label": "Deutsch" }
    ]
    }
  2. Copy the default language’s content into the new language’s folders and translate it: src/content/singletons/de/, and a de/ folder in each collection (for example src/content/blog/de/, src/content/docs/de/), with the same file names.

  3. Run pnpm dev. The new language lives under /de/…; the default stays at the root.

Links in the content (/pricing) lead to the same language’s pages by themselves. Anything you haven’t translated yet shows in the default language, marked as such for screen readers and search engines, so you can translate page by page.

  • A language switcher appears in the header and the phone menu (only with two or more languages).
  • Every page links its translations (hreflang), and the sitemap and /llms.txt list every language.
  • Dates follow the language (e.g. 2. September 2026).
  • Keystatic: every page and collection appears once per language (“Home page · Deutsch”). The brand is shared by all languages.
  • Sanity: run pnpm cms sanity schema and deploy the Studio. Single pages get one document per language; posts, docs and other collections get a Language field.
  • EmDash: languages come from src/i18n/locales.json; EmDash offers a translation of each entry in its editor.