Skip to content

CDN delivery

CDN delivery lets you serve your translation files from a globally cached endpoint, so your app can fetch translations quickly and reliably in production.

When enabled, Translatable publishes your project’s translation files to a CDN-backed URL. Your app (or edge/server) fetches the latest translations from that URL instead of bundling them at build time.

Typical use cases:

  • Ship updated translations without redeploying
  • Reduce latency for global users
  • Keep translation fetching cache-friendly

At a high level:

  1. You enable CDN delivery for a project.
  2. Translatable generates a CDN URL for that project and format.
  3. Your app requests translations from the CDN at runtime (or during server rendering).
  4. The CDN caches responses for fast repeat requests.

CDN delivery publishes exported translation files for your project, typically per language. The exact structure depends on your export format and key structure.

CDNs cache content for speed. To make sure users get updates quickly without losing performance, keep these principles in mind:

  • Translations are cacheable and should be served with caching headers.
  • Updates may take a short time to propagate globally depending on caching and invalidation strategy.

Fetch translations on app start (or when the user switches language), then keep them in memory.

Good when:

  • You want to update translations without redeploys
  • You don’t want to bundle all languages

Fetch translations on the server, then render pages with the correct language.

Good when:

  • SEO matters
  • You want translations available at first paint

Fetch translations at the edge and inject them into responses.

Good when:

  • You want ultra-low latency globally
  • You handle locale routing at the edge
  • Use timeouts and fallbacks in your app (e.g. fall back to bundled defaults if the CDN is unavailable).
  • Avoid blocking critical UI indefinitely on translation fetch.
  • Consider a simple in-memory cache on the server to reduce repeated requests.

CDN-delivered translation files are public (like any static asset). Do not store secrets in translation values.

If you have content that must remain private, keep it out of translation files.

  • Your CDN cache may still be serving an older version.
  • Try clearing your browser cache or testing with a cache-busting query parameter.
  • Ensure your integration respects cache headers and doesn’t persist stale values.
  • Confirm CDN delivery is enabled for the project.
  • Confirm you are using the correct project and language code.
  • Ensure the requested format/path exists (e.g. JSON vs CSV).
  • Projects & languages: how language codes affect delivered files
  • Strings & keys: how key structure affects export structure
  • Plans & limits: CDN delivery availability by plan