Internationalization & Language Packs
About 139 wordsLess than 1 minute
2026-09-01
Shirone keeps interface copy separate from article content. Navigation, buttons, and notices come from src/i18n/; authors choose the language of each post.
Configure a Language
Set the default interface language in src/config/siteConfig.ts:
export const siteConfig = withUserConfig("site", {
lang: "en",
});The code must match a dictionary under src/i18n/languages/. Shirone ships 10 interface locales. lang changes UI copy, not Markdown content.
Add a Translation
- Copy the closest dictionary.
- Keep key names and translate values only.
- Add each new key to every locale.
- Run
npx astro checkandpnpm build.
Keys live in src/i18n/i18nKey.ts; components resolve them through i18n(). Bilingual sites commonly use / and /en/ entry points. A post's lang only labels its language and does not create a translation automatically.
Copyright
Copyright Ownership:matsuzaka-yuki
License under:Attribution 4.0 International (CC-BY-4.0)