BI
21 stars 4 forks Quality 67 Trend 24MIT

Official TypeScript SDKs for Better i18n — Next.js, React, Expo/React Native integrations with CLI, MCP server, and CDN-powered translation delivery

Overview

TypeScript SDKs for the Better i18n localization platform Manage translations with CDN delivery, GitHub sync, and AI-powered workflows. Documentation · Website · Blog Most localization tools weren't built for modern developer workflows. Better i18n is different: - — translations sync as PRs, reviews happen in your existing workflow - — translations served from Cloudflare's edge network, updated without redeployment - — context-aware translation with Google Gemini, not word-by-word machine output - — full type safety across Next.js, React, Expo, and React Native - — AI agents can manage translations through the Model Context Protocol See the Next.js integration guide for routing, server components, and metadata setup. Supports offline caching, OTA translation updates, and automatic locale detection. See the Expo guide. Give your AI agent permanent better-i18n knowledge — SDK setup, key naming, CDN behavior, GitHub sync, and MCP tool usage — without pasting prompts each session.

README

TypeScript SDKs for the Better i18n localization platform

Manage translations with CDN delivery, GitHub sync, and AI-powered workflows.

Documentation · Website · Blog


Why Better i18n?

Most localization tools weren’t built for modern developer workflows. Better i18n is different:

How it compares

Feature Better i18n Crowdin Lokalise Phrase
GitHub-first workflow ✅ Partial Partial ❌
AI translation with context ✅ ✅ ✅ ✅
CDN delivery (no redeploy) ✅ ❌ ❌ ❌
TypeScript SDKs ✅ ❌ ❌ ❌
MCP server for AI agents ✅ ❌ ❌ ❌
CLI scanner (unused key detection) ✅ ❌ ❌ ❌
ICU MessageFormat support ✅ ✅ ✅ ✅
Open-source SDKs ✅ Partial ❌ ❌
Free tier ✅ ✅ ❌ ❌

Packages

Package Description Version
@better-i18n/cli CLI for scanning, syncing, and managing translations
@better-i18n/next Next.js SDK with middleware and hooks
@better-i18n/use-intl React hooks for use-intl integration
@better-i18n/expo Expo / React Native integration with offline caching
@better-i18n/core Core utilities for locale handling and formatting
@better-i18n/mcp MCP server for AI agent integration
@better-i18n/schemas Shared Zod validation schemas

Quick Start

# Install the CLI
npm install -g @better-i18n/cli

# Initialize in your project
npx @better-i18n/cli init

# Scan your codebase for translation keys
npx @better-i18n/cli scan

# Sync translations with the Better i18n platform
npx @better-i18n/cli sync

Framework Integration

Next.js

npm install @better-i18n/next
// middleware.ts
import { createI18nMiddleware } from '@better-i18n/next';

export default createI18nMiddleware({
  locales: ['en', 'tr', 'de'],
  defaultLocale: 'en',
});

See the Next.js integration guide for routing, server components, and metadata setup.

React with use-intl

npm install @better-i18n/use-intl
import { BetterI18nProvider, useTranslations } from '@better-i18n/use-intl';

function App() {
  return (
    
      
    
  );
}

function MyComponent() {
  const t = useTranslations('common');
  return {t('welcome')};
}

Expo / React Native

npm install @better-i18n/expo
import { BetterI18nExpoProvider, useTranslations } from '@better-i18n/expo';

export default function App() {
  return (
    <BetterI18nExpoProvider
      projectId="your-project-id"
      defaultLocale="en"
      fallbackMessages={fallback}
    >
      
    
  );
}

Supports offline caching, OTA translation updates, and automatic locale detection. See the Expo guide.

MCP Server (AI Agents)

npm install @better-i18n/mcp

Connect AI assistants like Claude, Cursor, or Windsurf to your translation workflow through the Model Context Protocol.

Agent Skill

Give your AI agent permanent better-i18n knowledge — SDK setup, key naming, CDN behavior, GitHub sync, and MCP tool usage — without pasting prompts each session.

npx skills add better-i18n/skills

Works with Claude Code, Cursor, Windsurf, and any agent that supports custom instructions. See github.com/better-i18n/skills.

Documentation

Visit docs.better-i18n.com for full documentation:

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

License

MIT — Better i18n

View the full README on GitHub

Install

npx @better-i18n/cli init
New to MCP? Start with the mcpskill.org guide →