
官方 TypeScript SDK 用于更好的 i18n — Next.js、React、Expo/React 与 CLI、MCP 服务器和 CDN 驱动的翻译交付集成
概览
TypeScript SDK 用于更好的 i18n 本地化平台 通过CDN传输、GitHub同步和AI驱动的工作流程管理翻译。文档 ·网站 ·博客 大多数本地化工具并非为现代开发者工作流程设计。更好的i18n则不同: - — 翻译同步为PR,审核发生在现有工作流程中 - — 翻译来自Cloudflare边缘网络,无需重新部署即可更新 - — 采用Google Gemini的上下文感知翻译,而非逐字机器输出 - — 在Next.js、React、Expo和React Native实现全类型安全 - — AI代理可以通过模型上下文协议管理翻译 请参阅Next.js集成指南中的路由、服务器组件和元数据设置。 支持离线缓存、OTA翻译更新和自动定位检测。详见博览会指南。 为你的 AI 代理提供永久的 better-i18n 知识——SDK 设置、密钥命名、CDN 行为、GitHub 同步和 MCP 工具使用——无需每次会话都粘贴提示。
概述(AI 翻译)
TypeScript SDK 用于更好的 i18n 本地化平台
通过CDN交付、GitHub同步和AI驱动的工作流程管理翻译。
文档 ·网站 ·博客
为什么更好 i18n?
大多数本地化工具并非为现代开发者工作流程设计。更好的i18n则不同:
- GitHub-native — 翻译同步为PR,审核在你现有的工作流程中进行
- CDN 交付 — 从Cloudflare边缘网络提供的翻译,无需重新部署即可更新
- AI驱动 — 采用Google Gemini的上下文感知翻译,而非逐字机器输出
- TypeScript-first — 在 Next.js、React、Expo 和 React Native 实现全类型安全
- MCP 准备 — AI 代理可以通过模型上下文协议管理翻译
相比如何
| 特色 | 更好的i18n | Crowdin | Lokalise | 短语 |
|---|---|---|---|---|
| GitHub优先工作流程 | ✅ | 部分 | 部分 | ❌ |
| 带上下文的AI翻译 | ✅ | ✅ | ✅ | ✅ |
| CDN交付(无重新部署) | ✅ | ❌ | ❌ | ❌ |
| TypeScript SDK | ✅ | ❌ | ❌ | ❌ |
| AI 代理 MCP 服务器 | ✅ | ❌ | ❌ | ❌ |
| CLI扫描器(未使用的密钥检测) | ✅ | ❌ | ❌ | ❌ |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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:
- GitHub-native — translations sync as PRs, reviews happen in your existing workflow
- CDN-delivered — translations served from Cloudflare’s edge network, updated without redeployment
- AI-powered — context-aware translation with Google Gemini, not word-by-word machine output
- TypeScript-first — full type safety across Next.js, React, Expo, and React Native
- MCP-ready — AI agents can manage translations through the Model Context Protocol
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 | ❌ | ❌ |
安装
npx @better-i18n/cli init