Localization Module Technical Specifications
A content-hash translation cache so AI is called once per unique text and reused forever, a background queue that runs translations in parallel without slowing down your team, and event-driven automation that starts translating the moment content is created or updated.
System Metrics
Translation Memory
content-hash cache with automatic reuse tracking
Background Queue
parallel workers with automatic duplicate-prevention
Auto-Translate
triggers automatically when content is created or updated
API routes
full REST surface
Data model
translation cache, glossary, and per-tenant language settings
Cache lookup
exact match on source text + target locale
Glossary rule types
do_not_translate, always_translate_as, guidance
Queue dedup
time-windowed for autonomous jobs, content-based for batch jobs
Supported languages
100+
Architecture Overview
| Capability | What it handles |
|---|---|
| **Translation memory** | Cache lookups, glossary rule injection, AI translation |
| **Background queue** | Parallel processing for autonomous + batch translation jobs |
| **Auto-translate** | Detects content changes and queues missing translations |
| **API routes** | translate / batch / glossary CRUD |
Translation Memory — Cache-First Design
Every translation Aeion generates is cached so the same source text is never sent to an AI model twice for the same target language.
How a single translation request is resolved:
- Fingerprint the source text. The source string is reduced to a stable cache key so lookups are exact-match and fast, regardless of table size.
- Check the cache. If a cached translation exists for that text + target locale and it hasn't been marked "rejected," it's returned immediately — no AI call, and the entry's reuse count is incremented for your usage dashboard.
- Load glossary rules. If nothing is cached, your tenant's glossary (brand terms, locale-specific phrasing, contextual guidance) is loaded and prepared for the AI prompt.
- Translate. The AI provider configured for your tenant generates the translation with glossary rules applied.
- Cache the result. The new translation is stored so every future request for that exact text + locale is served from cache.
Why exact-match caching instead of comparing raw text:
- Comparing raw strings gets slow as a translation history grows into the tens of thousands of entries.
- Text comparison also risks accidental partial matches or subtle formatting/whitespace differences producing cache misses that shouldn't happen.
- A stable, normalized cache key sidesteps both problems and keeps lookups fast at any scale.
Fuzzy/similarity matching (reusing a _close_ translation, not just an exact one) is on the roadmap; today the cache is exact-match only, which keeps translations predictable and auditable.
Background Queue — Parallel Processing With Built-In Dedup
Translation jobs run on a background queue so saving content never blocks on AI calls. Two job types:
- Autonomous jobs — triggered automatically when a document is saved with missing translations.
- Batch jobs — triggered by bulk imports or manual "translate all" actions.
Duplicate-prevention:
- Autonomous jobs are deduplicated within a short time window — if the same content is saved multiple times in quick succession, only one translation job runs instead of one per save.
- Batch jobs are deduplicated by content — resubmitting an identical batch doesn't queue duplicate work.
Reliability: failed jobs retry automatically with increasing backoff between attempts, and both completed and failed jobs stay visible in the admin queue view for troubleshooting.
Why parallel workers instead of one-at-a-time: most AI providers rate-limit requests per minute, and most tenants save content in small bursts rather than constant firehose volume — so a handful of workers running in parallel comfortably keeps pace with normal usage while leaving headroom for bursts (bulk imports, catalog launches). High-volume tenants can add dedicated workers so they aren't sharing capacity.
Auto-Translate — Event-Driven, Not Polling
Aeion doesn't poll for changes on a schedule — it reacts the moment content changes.
What triggers a translation check:
- A new document is created with localized fields.
- An existing document is saved (create and update share the same check).
What the automation does:
- Checks whether the collection being saved has any fields marked
localized: true. - Loads your tenant's active languages and default language.
- For each localized field, checks which target languages don't yet have a translated value on that document.
- Queues a translation job per missing language — fire-and-forget, so the save itself isn't slowed down.
What this looks like from the outside: save a page with an English title → a few seconds later, the Spanish, French, and German fields fill in automatically. No manual export, no waiting on a translator, no separate translation tool to log into.
What's Configurable Per Tenant
Language settings: each tenant configures its own list of active languages and a default (source) language from the Localization Console.
Glossary: each tenant maintains its own glossary of brand terms with three rule types:
do_not_translate— the term is always kept exactly as written.always_translate_as— the term maps to a specific translation per language.guidance— free-text instructions the AI follows when the term appears in context (e.g., "use the formal register for this word in German").
Translation review status: every translation carries a status of ai_generated, human_approved, or rejected. Marking an entry human_approved locks it in permanently; marking it rejected forces a fresh AI translation the next time that text is saved.
Key Architecture Decisions
Cache lookup
Exact content-hash match — fast at any scale, normalized, no accidental partial matches
Fuzzy matching
Not yet implemented — exact match only today; similarity-based reuse is on the roadmap
Queue dedup (autonomous)
Short time-window — same content saved repeatedly in quick succession leads to one job, not many
Queue dedup (batch)
Content-based — identical batch submissions are deduped automatically
Event handling
Creates and updates share one path — consistent translation behavior regardless of how content changed
Glossary enforcement
Applied before translation — glossary rules are given to the AI up front, not corrected afterward
AI dependency
Graceful degradation — glossary management and usage stats work even without AI configured; translation itself requires it