Skip to main content
Web & Performance

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.

Ahsan Bilal

Principal Software Engineer

Updated 2 min read
On this page

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)
  • Language — en, ur, ar, etc.
  • Tags — mobile, 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.

#Laravel#PostgreSQL#Redis#Vue 3#Docker#OpenAPI#i18n

See it in production

The product behind this article

All articles →
Web & Performance••2 min read

Building Customer Flow — A Multi-Tenant Cloud ERP

How we architected Customer Flow as a multi-tenant ERP for import/export, manufacturing, and enterprise operations with Next.js, FastAPI, PostgreSQL, and Redis.

FastAPINext.js