Try It Live
See all demos| en-US | zh-CN | ||
|---|---|---|---|
| $ | $1,234,567.89 | ¥1,234,567.89 | ¥1,234,568 |
| Mar 19, 2026 | 2026年3月19日 | 2026/03/19 | |
| 7 days ago | 7天前 | 7 日前 |
format.number(1234567.89, { style: "currency" })npx better-i18n doctori18n Doctor
Run in CI/CD, analyze in Dashboard. Catch missing keys, hardcoded strings, and orphan translations with a single command.
$ better-i18n doctor
████████████████░░░░82/100A
✓ Coverage 95
✓ Quality 88
! Code 72
✓ Structure 100
快速开始
i18n.config.ts
npm install @better-i18n/next
# i18n.config.ts
import { createI18n } from "@better-i18n/next";
export const i18n = createI18n({
project: "my-org/my-app",
defaultLocale: "en",
});
# middleware.ts
import { i18n } from "./i18n.config";
export default i18n.betterMiddleware();
export const config = {
matcher: ["/((?!api|_next|.*\\..*).*)"],
};为什么选择 better-i18n?
Dashboard → CDN → App
CDN 驱动传输
翻译内容从全球边缘节点提供,实现全球即时加载。
Next.jsExpoRemixHonoTanStack
框架集成
为 Next.js、React 等提供一级支持,配备专用 SDK。
home.title → "Welcome"
可视化控制台
在一个地方管理翻译、邀请协作者并跟踪进度。
MIT
开源
在 GitHub 上完全公开透明,社区驱动开发。
TanStack Start + CF Workers
Help Center
Multilingual help center powered by Better i18n — search articles, browse categories, all translated in real-time.
今天就开始构建多语言应用
几分钟内即可开始使用 better-i18n。免费起步,随项目成长而扩展。
MIT LicensedTypeScript-firstZero vendor lock-in