DocsPlatform

Publishing and the CDN

How a publish turns translations into cached JSON files on the CDN, the review gate, caching headers, the manifest, and rollback behavior.

On this page

Translating a string and publishing it are separate steps. Translations live in the project database and can be edited at will. A publish takes a snapshot and writes it to the CDN, which is what your apps load in production. Nothing reaches the CDN until you publish.

What a publish does

  1. For each locale you choose (default: all target locales of the project), Generic Translation builds the translation map, { "<hash>": "<translated ICU string>" }, from the project’s strings.
  2. If the project requires review, only approved translations go in. Otherwise the current translation of every string goes in, machine or edited.
  3. Each map is stored as /cdn/{projectId}/{locale}.json, and a manifest at /cdn/{projectId}/manifest.json is updated.
  4. A project.published webhook is sent.

Publishing replaces the previous snapshot of each requested locale. It does not touch locales you leave out, so you can publish one language at a time. The published maps contain strings from every branch of the project.

Publish from the Overview or Publishing page of the dashboard, with POST /publish, from the CLI, or from CI. The permission is translations:write (member role).

Review gate

Require review before publishing is a project setting. When on, a translation that is machine or edited is simply absent from the published map, and apps fall back to the source text for it. Approve strings in the editor, then publish. When off, everything is published as soon as it exists.

Turning the setting on does not change what is already published; it takes effect at the next publish.

URLs

https://generic-translation-api.jacobfv123.workers.dev/cdn/{projectId}/{locale}.json
https://generic-translation-api.jacobfv123.workers.dev/cdn/{projectId}/manifest.json

The locale in the URL is canonicalized, so pt_br and pt-BR reach the same file. The Publishing page lists each URL with a copy button. The endpoints are public and need no key, which is why a CDN map must contain only text that is safe to show to anyone who has the project id.

curl https://generic-translation-api.jacobfv123.workers.dev/cdn/prj_abc123/manifest.json
{
  "projectId": "prj_abc123",
  "defaultLocale": "en",
  "locales": ["es", "fr"],
  "version": "v1x9k2m3",
  "publishedAt": "2026-11-30T10:15:00.000Z"
}

Caching

Responses carry:

Header Value
cache-control public, max-age=60, stale-while-revalidate=600
etag A hash of the body. Send it back in if-none-match to get an empty 304.
x-generic-translation-version The publish version.
access-control-allow-origin *, so browsers can fetch maps directly.

So a new publish is visible to clients within about a minute, and caches may serve the previous version for up to ten more minutes while they revalidate in the background. If you need a stronger guarantee, ship the maps with your app instead; see CDN concepts.

Turning the CDN off

Switch Serve from the CDN off (or PATCH cdnEnabled: false). All /cdn/ URLs for the project then return 404 not_found, immediately at the origin. Use this if you bundle translation files with your app and want no public copy. Published data is kept and served again if you turn the switch back on.

Rolling back

There are no stored historical snapshots: a publish replaces the previous one. To undo a bad publish, fix the translations (edit, retranslate or delete strings in the editor) and publish again. Keep your own copy of important maps by downloading them with GET /translations/:locale.

CDN usage

Each served request is counted as cdnRequests in usage. The hosted instance is a preview with fair-use limits; see pricing.

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

Type to search the documentation.