常见问题

Everything you need to know about i18n-keyless before you start.

我需要管理翻译文件吗?

不。没有 JSON 文件,没有键提取步骤,也没有构建时插件。您用源语言编写句子,SDK 在首次请求时将它们发送到 API,API 使用 AI 进行翻译,之后的每次请求都从缓存中提供。您的代码是唯一的真理来源。

当我更改源文本时会发生什么?

源文本是键。修改它,你会得到一个新的键,并获得全新的AI翻译。旧键将不再被请求,仪表板会在30天未使用后自动清理。修正拼写错误也是一样:在代码中修正它,部署,新文本将在首次请求时被翻译。

多少钱?

托管计划为每个项目每月8欧元,按月计费,随时可以取消。自托管版本对于一个项目是免费的;无限项目一次性30欧元——无需订阅,无使用限制。在这两种情况下,您都可以自带AI密钥。没有按座位、按字数或按请求的定价。

Can I export my translations?

Yes. The dashboard has an "Export JSON" button that downloads every translation in your project as a single JSON file. The export includes all rows, not just the ones used in the last 30 days, so it is a full backup. There is no lock-in: your data is always one click away.

What frameworks does it support?

React, React Native, Vue, Svelte, Vanilla JS, Node.js, Ruby on Rails, Python, Go, Swift and Kotlin. Every SDK works the same way: wrap your text in a translation call, and the API returns the translation for the current language. The server SDKs are thread-safe and cache translations in memory.

How many languages are supported?

48 languages, including regional variants like zh-Hans / zh-Hant, en / en-GB, fr / fr-CA, pt / pt-BR, and es / es-MX. Arabic, Hebrew and Urdu are in the list, so right-to-left languages work too. Adding a new language to your project is one click in the dashboard.

Does it work with server-side rendering?

Yes. The Node.js SDK uses AsyncLocalStorage so your loaders, head functions and server components can translate without a React provider. On the client side, the React provider hydrates from the server-rendered HTML. There are step-by-step guides for Next.js, Nuxt, and TanStack Start in the documentation.

Does it slow down my app?

The first time a new string is requested, the API calls the AI model — that takes one to two seconds. Every request after that is served from the database, which is a regular cache hit. The SDK also caches translations locally, so returning users see zero network delay. If ten users request the same string at the same time, only one AI call is made.

What happens if the service goes down?

Every SDK caches translations locally — in localStorage on the web, AsyncStorage on mobile, and in memory on the server. If the API is unreachable, the SDK serves the cached translations. Your users see the last known translation, never a blank string. When the API comes back, the SDK refreshes silently.

Which AI provider does it use?

Five providers are supported: Mistral, OpenAI, Anthropic, Google, and any OpenAI-compatible endpoint such as Ollama, Groq, or Together. The operator picks the provider and the model from the dashboard or from the environment. The default on i18n-keyless.com is Mistral. Self-hosted users can run Ollama locally and send nothing to a third party.

Can I override an AI translation?

Yes. Click any cell in the dashboard, type the correct text, and save. The fix is permanent: the API never overwrites a value that was set by hand. You can also override translations through the API or through the MCP server, so an AI coding agent can fix a translation for you.

Can I migrate from i18next or another library?

Yes. There is a step-by-step migration guide for i18next, react-intl, and Lokalise in the documentation. The API has a migrate endpoint that imports your existing translations one by one, with no AI call and nothing billed. The MCP server has the same tool, so an AI agent can do the migration for you.

Is there a free plan?

There is no time-limited free trial. The self-hosted edition gives you one project free forever — install the Docker image, use your own AI key, and keep your data on your own server. The hosted plan is €8 per month per project, with no minimum commitment.

Is the source code available?

The server, the dashboard and the Docker image are published on GitHub under the Elastic License 2.0. You can read every line, run the code, and change it. The SDKs — React, Vue, Node, Rails and the others — are MIT-licensed. The only restriction: you may not offer the software as a hosted service to third parties.

自托管还是订阅:选择哪一个?

订阅:由我们运营,更新自动进行,每个项目一个价格。自托管:在您自己的服务器上使用完全相同的Docker镜像,免费安装,一个项目永久免费,无限项目一次性30欧元,使用您自己的AI密钥且数据留在本地。除非您想运行服务器,否则选择订阅。

阅读完整答案,包括代码
How do I handle dynamic values like names or counts?

Use the replace option. Write the sentence with a placeholder — "Hello {name}, you have {count} items" — and pass the values at render time with replace: { "{name}": userName, "{count}": String(n) }. The AI sees the placeholder and keeps it in every translation. The SDK substitutes the value at runtime.

我如何处理复数形式?

故意没有提供复数API。将每种形式写成完整的句子——“1个项目”和“{count}个项目”——并通过替换注入数字。模型会将每个句子翻译成其自身语言,因此即使有更多形式的语言在常见情况下也能自然阅读。

阅读完整答案,包括代码
我如何处理性别?

同样方式:每个表单一整句,再加上一个上下文告诉模型谁在说话、针对谁。两个上下文会为相同的词提供两种不同的翻译,因此“Welcome back”无论对女性还是男性都不会产生冲突。

阅读完整答案,包括代码
如何格式化日期、数字和货币?

SDK 不会格式化它们,而是由你的运行时处理。使用 Intl.DateTimeFormat 和 Intl.NumberFormat,结合 SDK 中的当前语言,然后用 replace 将结果插入句子。一句话,一句翻译,每种语言都有正确的格式。

阅读完整答案,包括代码
我可以自定义翻译提示吗?

不,你也不需要这样做。提示会读取每个键的上下文:这就是语气、受众和含义所在的地方,也是同一个词在不同地方翻译不同的原因。任何翻译都可以在仪表板中手动覆盖;API 永远不会覆盖你写的内容。

阅读完整答案,包括代码
Does it have an MCP server for AI coding agents?

Yes. The API is also an MCP server with OAuth 2.1 authentication. An AI agent can list translations, translate strings, override values, import existing translations, and manage project members — the same operations a human does in the dashboard. Connect it from Claude Code, Cursor, Windsurf, or any MCP-compatible client.

Can I use it for backend strings and emails?

Yes. The Node.js, Ruby on Rails, Python and Go SDKs run on the server. Translate an email subject, an error message, or a push notification the same way you translate a UI string. The server SDKs cache translations in memory and refresh in the background, so they do not add latency to your request.

Can my whole team work on translations?

Yes. Add team members to a project from the dashboard or through the API. Every member can see all translations, override any value, and add languages. Admins create projects and manage members. There is no per-seat pricing: add as many people as you need.

如何修复输入错误?

源文本就是键。修复源文本中的错别字后,你会得到一个新的键及其全新的翻译;旧字符串不再被请求,仪表板会在30天未使用后自动清理。翻译中的错别字:在仪表板中编辑单元格,修复将永久生效。

阅读完整答案,包括代码