Real-Time AI Translation for GoHighLevel — Azure Translator + Redis
Two layers that match the right tool to each kind of text: instant offline word packs for 20+ languages, plus metered Azure AI for live conversation translation — cached to near-zero cost.
92%+
Cache hit rate
~200ms
Batched translate
20+
Languages, full RTL
What made this hard
The agency's clients operate in Arabic, Urdu, Spanish and a dozen other languages, but GoHighLevel's interface is English-only. Machine-translating everything via API would cost a fortune and risk rewriting customer data (a contact named “New” must never become “جديد”). And conversation messages — unique, real-time text — can't be covered by any dictionary.
How I built it
A two-layer architecture that matches the right tool to each kind of text:
Layer 1 — Static word packs (free, instant)
Hand-curated dictionaries for 20+ languages swap every known UI string client-side. A DOM TreeWalker with strict block-lists never enters conversations, contact records or editable fields — customer data is untouchable by design. Full RTL support (Arabic, Urdu, Hebrew, Persian) via unicode-bidi: plaintext.
Layer 2 — AI translation (metered, cached)
For dynamic content the packs can't know, batches go to Azure AI Translator through a server-side proxy (keys never reach the browser). Every company gets a character-credit meter — 10,000 free, atomic Mongo deduction, top-ups — and translation only runs where a per-location toggle is ON.
The cost engine
An L1 in-memory + L2 Redis cache keyed by text (not by tenant) means once any agency pays to translate “Launchpad” into Arabic, every other agency gets it free forever. Client-side dedupe, batching, viewport-priority and script-detection skip keep requests minimal.
Technical highlights
Dual TTLs separate concerns: UI-like strings cache 30 days; conversation-like text only 72 hours (privacy). A Redis sorted set tracks the most-demanded strings, creating a promotion queue — hot strings graduate into the free static packs, so the paid layer shrinks itself over time. Per-company sliding-window rate limits stop runaway tabs from draining credits.
Results
- 92%+ cache hit rate after the first week — most page loads cost zero API characters
- Conversations translate in one ~200ms batched round-trip
- Azure free tier (2M chars/month) covers dozens of active companies
A note from the client
More case studies
View allWant something like this for your agency?
Tell me what you want your GoHighLevel platform to do, and I'll scope it within one business day.




