DocumentationLocale variants
Locale variants
locale and localeGroupId — multi-language template versions.
Group equivalent templates in different languages using locale and localeGroupId on EmailTemplateVersion.
Supported locales
es · en · it · fr · ca · de · null (neutral fallback)
Data model
| Field | Description |
|---|---|
locale | Language code for this version |
localeGroupId | Shared ID linking equivalent variants |
null locale | Neutral version — final fallback in campaigns |
When localeGroupId is null on the base version, its version ID acts as the group anchor.
Create variants
- Publish a base template version (e.g. Spanish
es) - Create a new version with the same
localeGroupIdandlocale: "en" - Translate subject and HTML
- Publish each variant
PATCH /templates/:id/versions/:versionId
{
"locale": "en",
"localeGroupId": "clxgroup..."
}
Campaign routing (ADR-033)
When a campaign sends, the fan-out picks the template per contact:
- Variant matching
Contact.locale CAMPAIGN_FALLBACK_LOCALE(defaultes)- Campaign base
templateVersionId
Resolved locale is stored in email_log.metadata.locale.
Unsubscribe links
Generated unsubscribe URLs include ?lang= with the contact's locale (ADR-029).
Related
- Create and edit
- Campaign workflow
- Contacts overview —
Contact.localefield