Paragraphs
Edge delivery

Translations substituted at the edge. Server-side.

Cloudflare Worker fronts your site. HTMLRewriter swaps translatable units in flight. No client-side JavaScript. Caches stay happy. p99 under 40ms.

What the Worker does

One pass through the response stream.

  1. 1. Receives the request. Resolves the locale from URL, cookie, or Accept-Language.
  2. 2. Forwards to your origin (WordPress, headless framework, static origin).
  3. 3. Streams the response through HTMLRewriter, looking for data-pg attributes.
  4. 4. Looks up each fingerprint in KV (hot path, p99 <5ms) and substitutes the locale-correct content.
  5. 5. Streams the rewritten response to the browser. End-to-end overhead: p99 <40ms.
Three delivery modes

Pick per project.

Build-time

Postbuild script writes messages/{locale}.json. Static frameworks (Next.js, Astro, Nuxt). Zero runtime overhead. Rebuild on translation update.

Edge runtime

Worker substitutes on every request. WordPress, dynamic apps, frequent content updates. p99 <40ms.

Hybrid

Marketing pages built statically, app pages substituted at the edge. Configurable per-route in the dashboard.

Why server-side

Versus a JS injection approach.

Several translation products inject a client-side script that fetches translations and rewrites the DOM after first paint. That works — but it adds a JS dependency on every page load, introduces a flash of untranslated content, and complicates crawler behaviour. Edge substitution happens before the response reaches the browser. The HTML the user (or the crawler) receives is already in their locale.

Caching

Edge cache fits this model.

We vary cache by locale and by translation revision. Approve a new translation; the Worker invalidates affected paths in milliseconds. KV updates propagate in <60 seconds globally. For sites using Cloudflare APO, the integration is fully compatible.

Start free in 30 seconds.

No credit card. 100,000 words on the free tier. Self-serve onboarding.