SuprSend supports two ways to localise notification templates. The right approach depends on what changes between languages.Documentation Index
Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
Use this file to discover all available pages before exploring further.
| Approach | Use when | How it works |
|---|---|---|
| Translations (recommended) | The text changes per language, but the template structure (layout, images, buttons) stays the same. | Use translation keys ({{t "key"}}) in your template. SuprSend resolves the key to the user’s language at send time from your uploaded translation files. |
| Language variants | The entire content differs per language — different images, layouts, buttons, or structure. Not just text. | Create a separate variant per language with a locale condition. Each variant has its own full content. |
Setting the user’s language
Before either approach works, each user needs a locale set on their profile. Use any backend SDK or the API:- Python SDK
- Node.js SDK
- REST API — set the
$localeproperty
en, es, fr, hi, de, pt-BR, etc.
Translations (recommended)
Translations let you keep one template and manage all language text in separate JSON files. The template uses translation keys instead of raw text — at send time, SuprSend looks up the key in the user’s language file and renders the translated text.How it works
-
Upload translation files — JSON files with key-value pairs, one per language (e.g.,
en.json,es.json,fr.json). Upload from the dashboard, CLI, or API. -
Use translation keys in your template — instead of writing raw text, use the
thelper:
- SuprSend resolves at send time — reads the user’s locale, finds the matching translation file, and renders the translated text with interpolated variables.
Example
Translation files:en.json
es.json
es receives: “Tu pedido #ORD-1234 ha sido enviado!”
Fallback logic
If the user’s locale file or key is missing, SuprSend falls back:- Exact locale (e.g.,
es-MX.json) - General language (e.g.,
es.json) - Default language (
en.json)
en.json as the base fallback.
When to use Translations
- The template layout, images, and buttons are the same across languages — only the text differs.
- You want a single template to serve all languages without creating variants.
- You’re scaling to many languages and don’t want to maintain separate content per language.
- You want to manage translations outside the template editor (via files, CLI, or API).
Language variants
For cases where the entire content differs per language — not just text, but different images, layouts, buttons, or structure — use language variants.When to use variants instead of translations
- The email design is structurally different per language (e.g., RTL layout for Arabic, different images for Japanese market).
- A specific language version needs completely different content (not just a translation of the same message).
- You want to visually author each language version separately in the editor.
How to create a language variant
- Open the template editor, click + in the Variants panel, and select New Variant.
- Set the Locale to the target language (e.g., Spanish).
- Give it a descriptive ID (e.g.,
default-es). - Author the content for that language. Use Import content to copy the default English variant as a starting point.
- Commit.
Combining language with tenant
For tenants that need both brand customisation and localisation, create variants with combined conditions — e.g., localees + tenant acme for Acme’s Spanish-speaking users.
The fallback order: tenant+locale → tenant+default locale → default tenant+locale → default.
Name these descriptively: acme-es, uber-fr, default-hi.
Which approach should I use?
My notifications are the same structure in every language, just different text
My notifications are the same structure in every language, just different text
Use Translations. Create translation files per language and use
t keys in your template. One template, zero variants.My email has different images, layout, or buttons per language
My email has different images, layout, or buttons per language
Can I use both in the same template?
Can I use both in the same template?
Yes. You can use translation keys inside a variant. For example, a tenant-specific variant for Acme could still use
t keys for localised text — so Acme’s Spanish users get both Acme branding and Spanish text without creating acme-es as a separate variant.I'm scaling to 10+ languages. Which is easier to maintain?
I'm scaling to 10+ languages. Which is easier to maintain?
Translations, by far. With variants, you’d need to maintain 10+ content versions per channel per template. With translations, you maintain one template and 10 JSON files that can be managed via CLI or API.