Type to search the documentation.

New Generic Translation is open source

Write your UI once.
Ship it in every language.

Open-source i18n libraries, a CLI and an AI translation service for React, Next.js, Vue, React Native, TanStack Start, Node and Python.

Not on npm yet. Install from source · the hosted service is free while in preview.

Bandeja de entradaProyectosAjustes

Hola de nuevo, Ada. Tienes 3 mensajes nuevos.

Última sincronización
30 nov 2026, 9:30
Almacenamiento usado
1234,5 MB
Nuevo mensaje

Sample translations written for this page · formatted live with @generic-translation/core · real content hashes

Trusted by teams building with Generic Translation

One pipeline from code to every locale

Each step is a separate tool you can use on its own.

codecontexttranslationsautomation
  1. 01 · Code

    Write text where it lives

    • Wrap JSX in <T> or call t(). The source language stays in your components, readable and greppable.
    • Variables, plurals and numbers are components too, so translators see placeholders instead of code.
    React components →
  2. 02 · Context

    Tell the model what you mean

    • Per-string context separates “Close” the button from “close” the distance, and is part of the content hash.
    • Project style instructions and a glossary of fixed or do-not-translate terms steer every request.
    Context and glossary →
  3. 03 · Translations

    Translated, checked, reviewed

    • Only new or changed strings are sent to the API; results are keyed by content hash and locale.
    • Edits are validated so variables and tags still match the source. Approve strings in the dashboard editor.
    Review editor →
  4. 04 · Automation

    Shipped from your pipeline

    • generic-translation translate (from @generic-translation/cli) extracts, translates and writes locale files in one command.
    • The GitHub Action opens a pull request with updated files on every merge, or publish maps to the CDN.
    CI setup →

Built for developers

Locale-aware formatting, layout direction and routing come with the libraries.

Layout that follows the language

Text grows and flips direction. getLocaleDirection tells you which way.

enSave changesltr
deÄnderungen speichernltr
ja変更を保存ltr
arحفظ التغييراتrtl

Numbers, dates and plurals

Small wrappers over Intl with cached formatters.

  • formatNum(1234567.5)
    • en-US1,234,567.5
    • de1.234.567,5
    • fr1 234 567,5
    • hi-IN12,34,567.5
  • plural(22)
    • enother
    • rufew
    • plfew
    • armany

1.249,50 € · 30 novembre 2026

Locale routing

Next.js middleware: path, then cookie, then Accept-Language, then the default.

  • /abouten
  • /es/aboutes
  • /fr/aboutfr
  • /FR/about→ /fr/about
  • /en/about→ /about

localePrefix: "as-needed" (also "always" and "never").

Try the message format

Runs entirely in your browser: no account, no network request.

Examples
Formatted output

Plural
—
Variables
—
Tags
—
Hash
—

The hash is the first 32 hex characters of a SHA-256 over the message, and is the key Generic Translation stores translations under. Read about the message format or how hashing works.

Fits the way you already ship

From a single CLI command to pull requests that open themselves.

GitHub agent

Connect a project to a repository and the agent reads your config, extracts messages, translates them and opens a pull request. No workflow file.

Connect GitHub

Needs a GitHub App registered by the instance owner, which has not been done on the hosted preview yet.

Works with every stack

A GitHub Action for every merge

A self-contained build of the CLI: no npm install, one secret.

push main
generic-translation/generic-translation-cli/action
generic-translation translate
PR Update translations es.jsonfr.json

Whole files, structure intact

Keys, front matter, markup and timestamps are preserved while the prose is translated.

jsonyamlmdmdxpostringsandroidxmlresxxliffcsvsrthtmltxt
es/fr/ja/

Or call it yourself

Everything the CLI and dashboard do goes through a public REST API.

The CMS connectors have only run against fakes built from each service's documentation.

Translations that understand context

Machine translation is only as good as what it is told.

Context resolves ambiguity

Context goes to the model with the string and is part of its hash.

  • "Close"
    • context: button that dismisses a dialog Cerrar
    • context: a store that is nearby Cerca

A glossary for fixed terms

Pin a translation per locale, or keep a term as written everywhere.

term🇪🇸 es🇩🇪 de🇫🇷 fr
Generic Translationdo not translate
workspaceespacio de trabajoArbeitsbereichespace de travail
invoicefacturaRechnungfacture

Style instructions for the project

Audience, tone and formality, sent with every translation.

style instructions119 / 8,000

A note-taking app for small teams. Friendly and concise. Informal “you” (tú, du, tu). Never translate the product name.

Plurals and selects per language

Each language gets the plural forms its grammar needs.

  • {count, plural, …} pl
    • one1 plik
    • few3 pliki
    • many5 plików
    • other1,5 pliku

Review before anything goes live

Every string has a status: machine, edited or approved. Turn on requires review and only approved strings are published.

source🇪🇸 esstatus
Save changesGuardar cambiosapproved
Closecontext: button that dismisses a dialogCerrarapproved
{count, plural, one {# file} other {# files}}{count, plural, one {# archivo} other {# archivos}}edited
Welcome back, <0>{name}</0>.Hola de nuevo, <0>{name}</0>.machine

Editor guide · Strings API · CLI reference

Reach users in every market

Regional variants, served from a CDN or shipped with your build.

en-USes-MXpt-BRfrdearhija

Regional variants

Translate into a language or a regional variant. Glossary lookups fall back from pt-BR to pt.

🇪🇸 es🇲🇽 es-MX
🇺🇸 en-US🇬🇧 en-GB
🇨🇳 zh-CN🇹🇼 zh-TW🇧🇷 pt-BR

See the supported locales →

CDN or local files

Publish one JSON map per locale, public with ETag and Cache-Control, or let the CLI write files into your repo.

  • GET /cdn/{projectId}/es.jsoncdn
  • public/_generic-translation/es.jsonlocal

Open source, self-hostable

The libraries and CLI are MIT licensed. The API is one Cloudflare Worker you can deploy to your own account.

Self-hosting guide → The API source is not public yet; the guide says what you need.

Translate your first component

The Next.js quickstart takes a fresh app to a translated page in a handful of steps. Free while in preview.