Skip to content

feat(docs): i18n scaffold + Chinese/Japanese pilot#411

Closed
vishr wants to merge 1 commit into
masterfrom
i18n-zh-ja
Closed

feat(docs): i18n scaffold + Chinese/Japanese pilot#411
vishr wants to merge 1 commit into
masterfrom
i18n-zh-ja

Conversation

@vishr

@vishr vishr commented Jun 16, 2026

Copy link
Copy Markdown
Member

First step of multilingual docs — Simplified Chinese (zh-cn) and Japanese (ja). This is a pilot for quality review before translating all ~56 pages.

What's in it

  • i18n config (astro.config.mjs): root locale (English stays at /…) + zh-cn + ja; translated sidebar group labels. Untranslated pages fall back to English with a "not translated" notice, so nothing 404s and we can translate gradually.
  • Pilot translations (4 files): Guide → Quickstart and Routing, in both languages.
    • Prose + frontmatter (title/description) translated.
    • Code, identifiers, commands, import paths kept verbatim.
    • In-locale links prefixed (/zh-cn/…, /ja/…).
  • Starlight's built-in UI (search, "On this page", nav, theme/language pickers) auto-translates for both locales — no extra work.

Verified (production build + preview)

181 pages built across 3 locales. Chinese & Japanese pilots render with translated prose + intact code; /zh-cn/guide/quickstart/ title is 快速开始; sidebar group labels show 指南/中间件/示例 and ガイド/ミドルウェア/クックブック; untranslated pages fall back.

How to review

Open the deployed preview (or npm run preview) at /zh-cn/guide/quickstart/, /ja/guide/routing/, etc., and check the translation quality/terminology. If it's good, I'll translate the remaining pages in both languages (plus a glossary for consistent terms).

Not in this PR

Full content (the other ~54 pages × 2 languages), and a translation glossary. Held until the pilot quality is signed off.

🤖 Generated with Claude Code

- Add Starlight i18n: root locale (English at /) + zh-cn + ja, with translated
  sidebar group labels. Untranslated pages fall back to English with a notice.
- Pilot translations (prove quality before full rollout): Guide → Quickstart
  and Routing, in both zh-cn and ja. Prose + frontmatter translated; code,
  identifiers, commands, and paths kept verbatim; in-locale links prefixed.
- Starlight's built-in UI strings (search, TOC, nav, theme/lang pickers)
  auto-translate for both locales.

Note: sidebar group-label `translations` are keyed by BCP-47 lang tag
(`zh-CN`), not the locale key (`zh-cn`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vishr

vishr commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Closing the i18n pilot — restarting the i18n work fresh (translation to be done via Codex). The approach/config from this pilot is documented for the redo.

@vishr vishr closed this Jun 16, 2026
@vishr vishr deleted the i18n-zh-ja branch June 16, 2026 04:14
@aldas

aldas commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@vishr, these translation maybe need someone native language speaker to give first assestment if the result is adequate quality.

@vishr

vishr commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Working on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants