Skip to content

feat: docs UI text and search in the page's language - #103

Merged
sapatmohit merged 1 commit into
mainfrom
feat/docs-ui-i18n
Nov 1, 2026
Merged

sapatmohit merged 1 commit into
mainfrom
feat/docs-ui-i18n

Conversation

@sapatmohit

Copy link
Copy Markdown
Member

Part of #96: the last code item, Fumadocs UI strings and search language.

Before

On `/ja/docs/…` the page content was Japanese, but Fumadocs' own interface was English ("Search", "On this page", sidebar, code-block and 404 labels). The search dialog also queried the English index, so searching インストール on a Japanese page found nothing useful.

Change

  • `src/i18n/fumadocs-ui.ts`: Fumadocs UI translations for es, ja and ar, covering all 49 strings Fumadocs ships (`fumadocs-ui/dist/.translations`), defined with `defineI18nUI`.
  • The root layout passes `docsUI.provider(locale)` to `RootProvider`. Fumadocs' search dialog reads that locale and sends `?locale=` to `/api/search`, which already indexes every language.
  • Fumadocs' own language toggle stays off: the site uses our `SiteLanguageSwitcher` (feat: language dropdown on the landing page and docs #100).

Verified (headless Chromium, `next start`)

  • `/ja/docs/…`: 検索 · このページの内容
  • `/ar/docs/…`: بحث · في هذه الصفحة
  • `/es/docs/…`: Buscar · En esta página
  • `/docs/…`: still Search · On this page
  • Searching インストール on a Japanese page sends `locale=ja` and returns the Japanese install page and its headings.

Lint, `format:check`, typecheck, tests, `build`, `build:lib` and `test:pack` all pass.

Fumadocs' own text (Search, On this page, sidebar, code-block and 404
labels) was English on translated docs pages, and the search dialog
searched the English index. RootProvider now gets Fumadocs UI
translations for es, ja and ar (all 49 strings) and the page's locale,
which the search dialog passes to /api/search.
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e4ef72fc-bd97-488c-a204-4ce7e00f6de4
Commits

Reviewing files that changed from the base of the PR and between 290b751 and 9e45daf.

Files selected for processing: 2
  • src/app/layout.tsx
  • src/i18n/fumadocs-ui.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sapatmohit
sapatmohit merged commit 2d41468 into main Nov 1, 2026
2 checks passed
@sapatmohit
sapatmohit deleted the feat/docs-ui-i18n branch November 1, 2026 20:25
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.

1 participant