Yousaf — GoHighLevel customization engineerYousaf.
Translation & Cost Engine

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
The challenge

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.

The solution

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.

Under the hood

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.

The outcome

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
What the client said

A note from the client

"Our clients operate in Arabic and Urdu, and the interface finally speaks their language — right-to-left and all. What impressed me most is that customer data never gets touched, and the live conversation translation is basically instant. The credit system keeps our costs near zero. Clients keep asking how we built something HighLevel itself doesn't offer." — Ahmed Farouk, Managing Director, Gulf Growth Partners. Rated 5 out of 5. Reviewed April 2025.

Want 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.

Yousaf, GoHighLevel white-label customization engineer