Files
ProxMenux/web/i18n/routing.ts
T
MacRimi f8cabb4700 Check translation contracts offline, add Swedish to the installer and enable the website languages
- Offline checks for terminal and website catalogs reject translations that change commands, paths, identifiers or placeholders
- Terminal and documentation texts that broke those contracts are corrected in every language
- Swedish can be chosen in the stable and beta installers
- The website routes, language switcher and exported pages cover the eight languages, with the shared website texts in each of them
- Website documentation translations are generated only when requested
- From PR #475 by @jcastro
2026-10-18 12:58:25 +02:00

28 lines
1.0 KiB
TypeScript

import { defineRouting } from "next-intl/routing"
/**
* i18n routing configuration for the ProxMenux web docs.
*
* - English is the default locale: the docs grew up in English and the
* homelab/Proxmox audience is primarily international. New locales
* land progressively; missing translations should fall back to the
* English message rather than 404.
*
* - `localePrefix: "always"` is required for `output: "export"` static
* builds and gives cleaner SEO: every URL carries an explicit locale
* segment (`/en/docs/...`, `/es/docs/...`) so hreflang and Google's
* per-language indexing work without ambiguity.
*
* - When adding a new locale here, also create
* `messages/<locale>/common.json` (mandatory) and start
* page-specific files under `messages/<locale>/docs/...`. See
* `CONTRIBUTING-TRANSLATIONS.md`.
*/
export const routing = defineRouting({
locales: ["en", "es", "de", "fr", "it", "pt", "sk", "sv"],
defaultLocale: "en",
localePrefix: "always",
})
export type Locale = (typeof routing.locales)[number]