Skip to content

i18n: elements site in Spanish, Japanese and Arabic (landing v1 shipped, follow-ups) #96

Closed

Description

@sapatmohit

Localize elements.babelize.co: landing page and docs in Spanish, Japanese and Arabic, done with Babelize itself (dogfooding). Product issues found along the way go to babelize-dashboard.

v1: landing page (machine translation)

  • .babelize/config.json: landing page only (src/app/page.tsx, src/components/landing/**), plus a glossary for product names and localization terms
  • npx babelize translate --to es,ja,ar: 517/537 strings translated
  • /es, /ja, /ar with <html lang dir> (Arabic RTL), hreflang Link headers, language remembered in NEXT_LOCALE
  • Docs kept English-only for now (/<locale>/docs → /docs)

Follow-ups

  • Hand pass on the translations (Claude Haiku). Hosted NLLB keeps glossary terms but breaks the grammar around them. Examples:
    • es: "Localization workspace" → localización espacio de trabajo (should be espacio de trabajo de localización)
    • es: "Browse open issues" → Busca en el issues abiertos
    • ja: "language switcher and locale picker" → 言語スイッチとローカル・ピックー (glossary term missed)
    • ja: hero "Localization UI Components for React." needs review end to end
  • The 20 strings with no translation (they fall back to English): mostly lost <span> placeholders and strings NLLB returned unchanged. Listed in .babelize/local/report.json after a run.
  • A language switcher in the landing navbar. Use our own LanguageSwitcher (dogfood): set NEXT_LOCALE and go to /<locale>/…. Today the language can only be changed through the URL.
  • Translated metadata (<title>, description, Open Graph) per locale. The layout's metadata export is still English.
  • Docs (MDX). Blocked on Babelize supporting Markdown/MDX (babelize/babelize-dashboard#377). Then drop SOURCE_ONLY in src/proxy.ts and move to Fumadocs i18n routing.
  • Locale-aware sitemap (/es, /ja, /ar entries with alternates).

Activity

  1. self-assigned this
    on Nov 1, 2026
  2. sapatmohit commented on Nov 1, 2026

    @sapatmohit
    MemberAuthor

    Docs are translated (es, ja, ar) in #98. Remaining follow-ups from that work:

    • Fumadocs UI strings. "Search", "On this page", "Table of contents" and the other Fumadocs labels are still English on translated pages. Fix: `RootProvider` i18n with `defineTranslations` per locale.
    • Search language. `/api/search?locale=ja` returns Japanese results, but the search dialog doesn't pass a locale yet, so it searches English. This gets fixed together with the `RootProvider` i18n above.
    • Language switcher on docs. There's no way to switch language from a docs page. Unprefixed URLs are always English now (the cookie redirect was removed in feat: Spanish, Japanese and Arabic docs #98), so the switcher only needs to change the URL prefix.
    • Native-speaker pass on ja and ar. The translations are Haiku output, checked for markup only. Flagged as awkward: "Readable {p0} clever." (strikethrough wordplay, rulebook) in all three languages.
    • Hreflang for docs. The proxy sends `Link` alternates for every page, but there's no `alternates.languages` in `generateMetadata` and no hreflang in the sitemap.

    Re-translating after an edit: `babelize translate --docs-only --to es,ja,ar` re-translates only the changed paragraphs (`.babelize/local/docs-lock.json`).

  3. sapatmohit commented on Nov 1, 2026

    @sapatmohit
    MemberAuthor

    All code follow-ups are done:

    Item PR
    Docs in es, ja, ar (MDX via Babelize, Fumadocs i18n) #98, #99
    Language dropdown on the landing page (desktop and mobile) and in the docs sidebar #100
    Hand pass on the landing translations (Haiku), plus the strings that had no translation (4/16/9) #101
    Translated metadata, hreflang, sitemap for every language (212 URLs), per-language canonical #102
    Fumadocs UI strings, and search in the page's language #103

    From the follow-up comment above, these are also done:

    Still open: a native-speaker pass on ja and ar. Everything is Haiku output, checked for markup and glossary only. Spots worth a look:

    • "Readable {p0} clever." (rulebook wordplay)
    • the Japanese hero line order (`ローカライゼーション UI コンポーネントReact 向け。`)
    • Arabic letters joined directly to Latin brand names (`وreact-intl`)

    Translations are pinned in `.babelize/local/babelize-lock.json` (`metadata.manual`) and `docs-lock.json`. A reviewer's fixes can go straight into `public/locales/*.json` or the docs pages; for docs, also update the matching lockfile entry so Babelize keeps the fix.

  4. sapatmohit commented on Nov 1, 2026

    @sapatmohit
    MemberAuthor

    Closing: all code follow-ups are done (#98–#103). A native-speaker pass on ja and ar can happen any time without this issue; the flagged spots are listed in the comment above.

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestwebsiteLanding page, docs site, or content

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions