Skip to main content
ABScaleForge
Back to blog
2 min read

Translation API at Scale — 100k+ Keys Without Redeploys

Designing a translation hub with Laravel, PostgreSQL, Redis, and a public JSON export API so mobile and web apps fetch language bundles without shipping new builds.

LaravelPostgreSQLRedisVue 3DockerOpenAPIi18n

Apps need text in many languages, but translations often live in code files or Excel — hard to search, update, or serve reliably. The Translation Management System is a hub where product teams manage phrases and apps download one JSON bundle per language.

The problem with translations in code

  • Mobile apps need store releases to fix a typo
  • Web deploys bundle all languages even when only one changed
  • Product managers cannot edit copy without engineering
  • No audit trail of who changed customer-facing text

Centralizing translations in a database with a public export API fixes all four.

Data model

Phrases are keyed by:

  • Key — stable identifier (checkout.button.pay)
  • Languageen, ur, ar, etc.
  • Tagsmobile, web, marketing for filtered exports
  • Namespace — optional grouping per app or module

Apps request /api/export/{lang}.json?tags=mobile and receive a flat or nested JSON map.

Performance at 100k+ rows

Test datasets with 100,000+ phrase rows validated:

  • PostgreSQL indexes on (language, key) and tag join tables
  • Redis cache of compiled JSON bundles with Cache-Control headers
  • ETag support so clients send If-None-Match and get 304 Not Modified
  • Docker + Nginx for production with gzip enabled on JSON responses

OpenAPI docs help integrators understand query params and response shapes without reading Laravel source.

Admin UI

Vue 3 + TypeScript admin for search, bulk edit, import/export CSV, and tag management. Non-engineers update copy; engineers integrate once.

Deployment

Docker Compose for local dev matches production: Laravel app, PostgreSQL 16, Redis, Nginx reverse proxy. CI builds images and deploys consistently.

Takeaway

Treat translations as infrastructure, not string files in git. A cache-friendly export API lets you ship copy changes hourly while app releases stay monthly.