Repository navigation
feat(i18n): Korean localization of the docs, landing, and UI - #8
Merged
Merged
Conversation
Make the site bilingual. English stays at the un-prefixed URLs; Korean lives under `/ko` (`/ko`, `/ko/docs/...`). Infrastructure: - Fumadocs i18n loader (`defineI18n`, en default + ko) with a `/ko/docs` route branch sharing the docs UI; locale-aware page tree + `meta.ko.json` sidebars. - A locale context, a `useUiStrings()` dictionary for all non-doc UI copy, a language switcher that navigates to the equivalent page, and a locale-aware MDX `<a>` so translated pages link within their language without carrying prefixes. `<html lang>` and Fumadocs' own strings (search, TOC, pager) follow the locale. Content (polished per technical-writing.dev — one idea per sentence, active voice, consistent terminology; code, commands, package/API names, paths, and URLs left unchanged): - All 57 docs pages translated to Korean (`*.ko.mdx`) + 12 sidebar metas. - Landing page, header/nav, and footer localized. Verified: build, lint, and format pass; every page renders 200 in both locales; Korean content, sidebar, nav, and UI strings render correctly while English is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhaZ2zL7bAqT3c8mRWTSs9
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
webview-bundle-website | e6a9470 | Commit Preview URL Branch Preview URL |
Jul 01 2026, 03:56 PM |
There was a problem hiding this comment.
4 issues found across 92 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="content/docs/references/bridge/testing.ko.mdx">
<violation number="1" location="content/docs/references/bridge/testing.ko.mdx:139">
P2: Card href links are not localized. When viewed on the Korean page, `<Card href="/docs/references/bridge">` points to the English path instead of `/ko/docs/references/bridge`, breaking locale consistency.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| <Cards> | ||
| <Card | ||
| title="Bridge 개요" | ||
| href="/docs/references/bridge" |
There was a problem hiding this comment.
P2: Card href links are not localized. When viewed on the Korean page, <Card href="/docs/references/bridge"> points to the English path instead of /ko/docs/references/bridge, breaking locale consistency.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At content/docs/references/bridge/testing.ko.mdx, line 139:
<comment>Card href links are not localized. When viewed on the Korean page, `<Card href="/docs/references/bridge">` points to the English path instead of `/ko/docs/references/bridge`, breaking locale consistency.</comment>
<file context>
@@ -0,0 +1,147 @@
+<Cards>
+ <Card
+ title="Bridge 개요"
+ href="/docs/references/bridge"
+ description="이 헬퍼가 대신하는 invoke 진입점, 명령어 그룹, 오류를 다룹니다."
+ />
</file context>
With i18n enabled, Fumadocs builds a per-locale Orama index and maps `ko` to the Orama language `ko`, which has no stemmer — so searching threw "Language 'ko' is not supported". Add a `localeMap`: English keeps Orama's default tokenizer, and Korean gets a lightweight character-bigram tokenizer (Hangul runs → overlapping 2-grams, Latin/number runs kept whole, all lowercased). This needs no dependency and runs on workerd, and gives solid Korean recall (`번들` matches `번들을`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhaZ2zL7bAqT3c8mRWTSs9
- Localize <Card> hrefs: Cards render their own anchor and bypassed the locale-aware `a`, so on Korean pages they pointed to the English paths. Add a LocalizedCard wrapper so every card link resolves within its locale. - Derive DEFAULT_LOCALE from the defineI18n config (single source of truth). - Remove the unused useLocaleFromPath hook (and its now-unused import). - Translate the remaining descriptive English card/code-block titles to Korean, matching each card to its target page's Korean title (kept API/class names, HTTP endpoints, filenames, and product names). Verified: build, lint, and format pass; Card links on `/ko` now prefix `/ko`, and no descriptive English titles remain. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HhaZ2zL7bAqT3c8mRWTSs9
# Conflicts: # src/routes/api/search.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the site bilingual (English + 한국어). English keeps the un-prefixed URLs; Korean lives under
/ko—/kofor the landing,/ko/docs/...for the docs. Translations follow the technical-writing.dev review guide: one idea per sentence, active voice with the developer as subject, concise, and consistent terminology (a locked glossary — bundle→번들, protocol→프로토콜, remote→원격, …). Code, commands, package/API names, file paths, and URLs are left unchanged.What's translated
*.ko.mdx(Guide, References, Config, Changelog).meta.ko.json(Korean section labels: 소개 / 기능 / 플랫폼 / 원격 …).Infrastructure
defineI18n, English default), a/ko/docsroute branch that shares the docs UI from the locale's page tree, and locale-aware sidebars.useUiStrings()dictionary for all non-doc UI copy, a language switcher that jumps to the equivalent page in the other locale, and a locale-aware MDX<a>so translated pages link within their own language (no/koprefixes hand-written in content).<html lang>and Fumadocs' own strings (search box, "On this page", pager, theme/language menus) follow the active locale.How it was built
.ko.mdxrendering,meta.ko.jsonlabels, link localization).Verified
yarn build,yarn lint,yarn format --checkall pass./ko/*renders Korean content, sidebar, nav, and Fumadocs UI strings;/and/docs/*are unchanged English (lang="en", English UI).🤖 Generated with Claude Code
https://claude.ai/code/session_01HhaZ2zL7bAqT3c8mRWTSs9
Summary by cubic
Adds full Korean localization across docs, landing, and UI to make the site bilingual. Per-locale search is now supported, using a Korean morpheme tokenizer and ensuring all links on
/kopages stay in Korean.New Features
*.ko.mdx,meta.ko.json).useUiStrings().defineI18n(defaulten, plusko), shared docs UI for both locales, and/ko+/ko/docsroutes.<html lang>and Fumadocs UI strings follow the locale.번들matches번들을).Migration
/docs/*; add a.ko.mdxsibling and optionalmeta.ko.jsonfor Korean./docs/...links in content; anchors are localized at render time.src/lib/ui-strings.tsand read them withuseUiStrings().Written for commit e6a9470. Summary will update on new commits.