Skip to content

Language Packs

pH7x Systems edited this page Jul 21, 2026 · 1 revision

Language Packs

A language pack gives Sardine CMS a language it does not ship — as data, not code (ADR-0034). Every locale travels through the same contract the five bundled languages use: there are no privileged languages, no schema columns per language, and no admin surface that grows with the language count.

What a pack carries

One LanguagePack object contributed via Extension.language_packs: the tag, text direction (ltr/rtl), the language's native_name, the public-site UI labels, twelve month names, a deterministic date pattern, and optionally a gettext .po admin catalog. A pack with a catalog is also a panel language: the admin switcher lists it by its native name and the chrome mirrors when the pack says rtl.

Activation

extensions = ["sardine_lang_mir"]

[site]
source_language = "mir"
languages = ["en"]

That is the whole integration: URL root for the source, /mir/ when a target, labels, dates, feeds, hreflang and validation parity all follow the pack. A configured tag without its activated pack fails loudly.

RTL

direction="rtl" is everything: dir lands on the markup, both bundled themes and the panel are flow-relative CSS only (the theme conformance suite bans physical properties), and CI drives an RTL build through the axe accessibility gate on every push.

Publishing a pack

Name it sardine-lang-<tag>, tag the repository sardine-cms + sardine-lang, and open a pull request for the registry row — see the repository's docs/LANGUAGE_PACK_GUIDE.md for the full authoring guide, catalog notes and the testing recipe.

Clone this wiki locally