mcpField
B
better-i18n

better-i18n

github.com/better-i18nDevelopment8191 installsUpdated 24w ago
Repository

About better-i18n

better-i18n is a localization infrastructure skill for modern applications, covering translation management, content, and publishing workflows. It offers SDKs for multiple frameworks and MCP tools for managing translation keys and copy.

Key features

  1. 01SDKs and tools for multiple frameworks
  2. 02CLI scans and syncs translation keys
  3. 03Publish translations to CDN or GitHub
  4. 04CMS for localized content
  5. 05Analytics for coverage and localization health

Use cases

  1. 01Scan code for hardcoded strings
  2. 02Check translation coverage and key sync
  3. 03Publish translations to a CDN or GitHub

MCP support

It provides MCP tools for AI-assisted management of translation keys and translations, with separate @better-i18n/mcp and @better-i18n/mcp-content packages.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/better-i18n/skills --skill better-i18n

After installing, type/better-i18nin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
references/
cdn.md
cli.md
content.md
file-formats.md
github-sync.md
key-naming.md
mcp.md
publish-and-analytics.md
sdk-mobile.md
sdk-next.md
sdk-react.md

Details

From the project README

better-i18n — Localization infrastructure for modern apps. CMS + TMS + CDN + AI + MCP. Dashboard: https://better-i18n.com · Docs: https://docs.better-i18n.com · CDN: https://cdn.better-i18n.com · Skills: https://github.com/better-i18n/skills

Package versions

PackageVersionInstall
@better-i18n/next0.7.2npm install @better-i18n/[email protected]
@better-i18n/use-intl0.5.0npm install @better-i18n/[email protected]
@better-i18n/core0.5.0npm install @better-i18n/[email protected]
@better-i18n/expo0.7.5npm install @better-i18n/[email protected]
@better-i18n/sdk3.2.0npm install @better-i18n/[email protected]
@better-i18n/cli0.2.6npx @better-i18n/[email protected]
@better-i18n/mcp0.15.5npx -y @better-i18n/[email protected]
@better-i18n/mcp-content0.8.1npx -y @better-i18n/[email protected]

Always check npm for the latest version before installing.

SDK selection

FrameworkPackageReference
Next.js (App Router or Pages Router)@better-i18n/next<references/sdk-next.md>
React + TanStack Router / use-intl@better-i18n/use-intl<references/sdk-react.md>
Hono / Node.js server@better-i18n/server<references/sdk-react.md>
Remix / Shopify Hydrogen@better-i18n/remix<references/sdk-react.md>
React Native / Expo@better-i18n/expo<references/sdk-mobile.md>
Swift (iOS / macOS / visionOS)BetterI18n via SPM<references/sdk-mobile.md>
Flutter / Dartbetter_i18n pub.dev<references/sdk-mobile.md>
Headless / Vanilla JS@better-i18n/core<references/sdk-react.md>

Framework quick-start

FrameworkDocs page
Next.js App Routerhttps://docs.better-i18n.com/frameworks/nextjs.mdx
TanStack Start (SSR)https://docs.better-i18n.com/frameworks/tanstack-start.mdx
Vite + Reacthttps://docs.better-i18n.com/frameworks/vite.mdx
Vite + React Routerhttps://docs.better-i18n.com/frameworks/vite/react-router.mdx
Remix / Hydrogenhttps://docs.better-i18n.com/frameworks/remix.mdx
Expo / React Nativehttps://docs.better-i18n.com/frameworks/expo.mdx
iOS / Swifthttps://docs.better-i18n.com/frameworks/ios.mdx
Flutter / Darthttps://docs.better-i18n.com/frameworks/flutter.mdx
Hono / Node.jshttps://docs.better-i18n.com/frameworks/server-sdk/hono.mdx
Express / Fastifyhttps://docs.better-i18n.com/frameworks/server-sdk/node.mdx
tRPChttps://docs.better-i18n.com/frameworks/server-sdk/trpc.mdx
Supabase Edgehttps://docs.better-i18n.com/frameworks/server-sdk/supabase.mdx

Workflow selection

TaskApproachReference
Upload JSON files, no GitHub neededCDN-first<references/cdn.md>
GitHub PR-based translation syncGitHub App + publish flow<references/github-sync.md>
AI-assisted key and translation managementMCP tools<references/mcp.md>
Localized CMS content (blog, docs, pages)Content CMS + SDK<references/content.md>
Scan codebase for hardcoded stringsCLI scan<references/cli.md>
Check translation coverage and key syncCLI sync / check<references/cli.md>
Full i18n health analysis with scoreCLI doctor<references/cli.md>
Define key naming and namespace structureKey conventions<references/key-naming.md>
Choose JSON file formatFile formats<references/file-formats.md>
Publish translations to CDN or GitHubPublish flows<references/publish-and-analytics.md>
Track coverage, health trends, CDN usageAnalytics<references/publish-and-analytics.md>
Format dates, numbers, currencies, relative timeFormatting<references/sdk-react.md>
Detect locale from country / Accept-LanguageGeo detection<references/cdn.md>
Type-safe t("key") autocompleteTypeScript<references/sdk-react.md>
Webhooks on publish / key change eventsOutgoing webhooks<references/publish-and-analytics.md>

Read the relevant reference before writing any code.

Critical rules (apply everywhere)

  • Project identifier is always "org/project" — e.g. "acme/dashboard" or "stripe/web"
  • Locale codes are lowercase BCP 47 on the CDN: "pt-BR" → "pt-br". Always call normalizeLocale() before constructing CDN paths.
  • Singletons — createI18n (Next.js), createServerI18n, createRemixI18n, createI18nCore must be instantiated once at module scope. Never inside a function, request handler, or component.
  • createKeys vs updateKeys — createKeys creates NEW keys only. Using it on existing keys causes phantom key accumulation (documented incident: 1,005 duplicates in one operation). Always fetch the key ID with listKeys first, then call updateKeys.
  • CDN always returns HTTP 200 — check for { fallback: true } in the JSON body, not HTTP status codes.
  • Default namespace → "translations" in CDN paths — the namespace "default" is stored as "translations" internally. Use null namespace for flat-key projects.
  • Free to get started — all SDKs and CLI are open-source. Paid plans unlock more languages, history, and team features.

Comments

Markdown supported