DocsStart here

FAQ

Short answers to the questions that come up first.

On this page

Is Generic Translation free?

The libraries and CLI are MIT licensed and free. The hosted API, dashboard and CDN are free during the preview, with fair-use rate limits; billing is switched off. There are no paid plans or tiers. A prepaid-credits model with a free monthly allowance is built and will apply when billing is switched on. See pricing and billing.

Do I need an account to use the libraries?

No. @generic-translation/react, @generic-translation/node and @generic-translation/core render from translation maps, and a map is a JSON file. An account is only needed if you want the hosted service to produce translations for you.

Which model translates my strings?

Each project has a model setting, shown in the dashboard’s project settings. The hosted service runs open-weight models on Cloudflare Workers AI by default. A self-hosted deployment can choose its own default.

How good are the translations?

They are a strong first draft in widely used languages and less reliable in languages with little written material online. Quality improves noticeably when you give the model something to work with: a context on ambiguous strings, project instructions describing your product and tone, and a glossary for terms that must be translated one way. For anything user-facing and important, turn on review and have a fluent speaker approve it.

What happens when a translation is missing?

The source text is rendered. Users never see a key or an empty element.

What happens when I change a sentence?

Its hash changes, so it is a new unit and is translated on the next generic-translation translate. Until then, that one sentence renders in the source language. The old translation stays cached, so reverting brings it back.

Do I have to use <T>? I like key files.

No. Dictionaries give you d("nav.home") over a JSON file you maintain. You can mix both styles in one app.

Why ICU MessageFormat?

It is a long-standing standard with implementations in most languages, it handles plurals and gender properly, and translators and tools already know it. Generic Translation adds only tags (<0>…</0>) on top, which is a common extension for rich text.

Can translations break my markup?

Not structurally. A message contains tag numbers, never HTML attributes, so a translation cannot change a link target or inject markup. Translations that drop or invent variables or tags are rejected by the compatibility check.

Is my API key safe in the browser?

Do not put it there. Keys can spend your quota and, depending on their permissions, edit translations. Browsers should read from the CDN or from bundled files, neither of which needs a key. Create keys with the narrowest permissions that work.

Are published translations private?

No. The CDN is unauthenticated by design. Treat published translations like any other public asset of your site, and do not put secrets in translatable strings.

Does it work with right-to-left languages?

Yes. getLocaleDirection() in @generic-translation/core reports rtl for Arabic, Hebrew, Persian, Urdu and other right-to-left locales. Set dir on your <html> element from it; laying out the page for RTL is still your CSS’s job.

Which frameworks are supported?

React 18 and later, including Next.js with the App Router, and any Vite or other client-rendered React app. On the server, Node 20 and later. @generic-translation/core runs anywhere with standard Intl and WebCrypto, including Cloudflare Workers, Deno and Bun.

Can I translate Markdown, JSON or subtitle files?

Yes. The files feature handles 13 formats including JSON, YAML, Markdown, MDX, HTML, SRT, PO, .strings, Android XML, RESX, XLIFF and CSV.

Can I move away from Generic Translation later?

Your translations are plain JSON maps of ICU strings, downloadable at any time through the CLI or the API. The libraries keep working from those files with no service behind them.

Where do I report a bug or ask for help?

GitHub issues. It is the only support channel during the preview.

Something wrong or unclear on this page? Open an issue.

Type to search the documentation.