snsn-codex natively supports internationalization (i18n).

Directory Structure

Content is managed in language-specific folders under src/content/wiki/.

src/content/wiki/
├── ja/                → Japanese (Root Locale)
│   ├── index.mdx
│   └── sample/
└── en/                → English
    ├── index.mdx
    └── sample/
  • Accessing the root / redirects to the default language (usually ja).
  • Use the language toggle (JA / EN) in the header to switch languages.

[[Page Name]] automatically adjusts the link based on the current display language.

  • JA mode: [[Getting Started]]/wiki/ja/sample/getting-started
  • EN mode: [[Getting Started]]/wiki/en/sample/getting-started

Automatic Fallback

If an English page doesn’t exist yet, the system automatically finds and displays the Japanese (ja/) content.

  • A banner notice (“This page doesn’t have a corresponding language version…”) is displayed at the top of fallback content.
  • This allows you to maintain the Wiki’s functionality without having to translate everything at once.

UI Translations

UI strings like navigation labels and buttons are defined in src/i18n/index.ts. Edit this file to add new languages or modify existing text.

Localized 404

When accessing a missing page, the system detects the language from the URL path and shows the appropriate 404 page.

  • /en/something-wrong → English 404 page
  • /wiki/ja/missing → Japanese 404 page

Back to Getting Started