|
Documentation
Book a DemoPlatform
Platform
MCPCLIAPIWorkflows
GuidesChangelog

Getting Started

  • Introduction
  • Connect Your Engine

Localization Engine

  • Overview
  • Brand Voices
  • Instructions
  • Glossaries
  • LLM Models
  • Cache Tokens
  • Locale Resolution

Quality

  • Reports
  • AI Reviewers
  • Playground
  • Engine Suggestions

Admin

  • API Keys
  • Team
  • Roles & Permissions
  • Audit Logs

Locale Resolution

Every glossary item, brand voice, instruction, and model config is stored against a locale. When the engine processes a translation request, it resolves which stored entries apply to the request locale - matching exact codes, inheriting across regional variants, and falling back when no exact entry exists. The same resolution applies to all four configuration surfaces.

How it works#

Locales are normalized to a canonical form on input, then stored and returned in that form. Casing and delimiters are fixed; subtags are preserved.

You enterStored as
ENen
en_USen-US
sr_Latn-RSsr-Latn-RS
zh-cnzh-CN

Matching is bidirectional across the subtag boundary - a stored locale applies to a request when one is an exact match or an ancestor of the other. Two spellings of the same locale also match when neither is an ancestor of the other but a region determines the script: the region-only and script-qualified forms are equivalent (zh-CN ≡ zh-Hans-CN, zh-TW ≡ zh-Hant-TW).

StoredApplies toDoes not apply to
dede, de-DE, de-AT, de-CH-
de-DEde-DE, dede-AT, de-CH (siblings)
zh-CNzh-CN, zh-Hans-CN, zhzh-TW, zh-Hant-TW (different script)

Reverse-inheritance

A stored de-DE answering a bare de request is the dominant real-world pattern: most engines are configured against full regional codes but receive base-code requests. Both directions are supported.

Resolving between multiple matches#

When more than one stored entry applies, the engine ranks them and uses the best:

  • Exact or language-default first. For a de request, de-DE (the CLDR default region for German) is preferred, then bare de.
  • Most specific next, as a tiebreak.
  • Any other matching region survives as a fallback - a customer whose only entry is de-CH still gets it for a de request when nothing better matches, so configuration is never orphaned.
RequestPreferredAlso applies (fallback)Excluded
dede-DE, then dede-CH, de-AT-
de-DEde-DE, then de-de-AT, de-CH
de-ATde-AT, then de-de-DE, de-CH

Script safety#

One extra rule applies only to glossary custom_translation items, whose text is bound to a specific orthography. A base language with an ambiguous script - sr (Cyrillic or Latin), zh (Simplified or Traditional) - must commit to a script on write, either as an explicit script (zh-Hans, sr-Cyrl) or a region that determines one (zh-CN → Simplified, sr-RS → Cyrillic, per CLDR). Only a truly bare code with no script and no region is rejected. On read these commit forms are equivalent - a glossary stored as zh-Hans-CN applies to a zh-CN request and vice versa - but a bare zh request, whose script is unknown, does not pick up a script-committed row, so send an explicit script or region for predictable results. Languages with a single script, like de, need no script and resolve de to de-DE normally. non_translatable items pass through regardless of script.

Example#

An engine configured with regional codes (en-US to fr-FR, de-DE, nb-NO) receiving base-code requests (fr, de, no):

  • A fr target picks up the fr-FR glossary, brand voice, and instructions - ranked as the default for fr, not a last resort, because fr-FR is the CLDR default region for French.
  • A source of en matches en-US entries - matching is bidirectional.
  • A no target does not pick up nb-NO. no and nb are different language subtags, not a region pair; use nb as the target.

Using locale resolution with the API#

Resolution happens automatically when you call the localize endpoint. The engine matches the request's sourceLocale and targetLocale against stored glossaries, brand voices, instructions, and model configs - no additional parameters are needed.

Next Steps#

Glossaries
Map source terms to exact translations per locale
Brand Voices
Define overall tone and formality per locale
Instructions
Add linguistic rules for specific locale pairs
LLM Models
Configure per-locale model selection and fallbacks

Was this page helpful?

Max PrilutskiyMax Prilutskiy·Updated 4 days ago·3 min read