Key concept: One template + multiple translation files = localized notifications for all your users.
How translations work
SuprSend handles localization behind the scenes. When a user receives a notification, it:Step | Process | How it works | Example |
---|---|---|---|
1 | Detect user locale | Identifies from user profile | es_MX |
2 | Find best translation file | Uses smart fallback logic | es-MX.json → es.json → en.json |
3 | Replace keys | Substitutes with translated content | {{t "welcome"}} → ¡Bienvenido! |
4 | Send localized notification | Delivers in user’s preferred language | Delivered in Spanish (Mexico) |
Translation directory structure
Translation files must be organized by locale codes:Naming convention: SuprSend supports both underscore (
en_GB
) and hyphen (en-GB
) formats. Internally, both map to the same locale.- Language only
- Language + Region
- Namespaced files
Format:
{language}.json
Contains translations for a specific language without regional variations.en.json
(English)Fallback logic
SuprSend automatically selects the best available translation for each user based on their locale. If a translation is missing, the system uses an intelligent fallback chain to ensure the notification is still localized. Fallback order:- Exact locale match →
es-MX.json
(Spanish – Mexico) - Language-only fallback →
es.json
(Spanish – General) - Default fallback →
en.json
(Base language)
Best practice: Always maintain an
en.json
file as the base language. It ensures your system always has a fallback even if locale-specific keys are missing.Translation key types
Translation keys can be organized using two main approaches:- Normal keys
- Namespaced keys
Simple key-value pairs:Benefits:
- Simple and straightforward - Easy to understand and implement
- Quick to set up - No need to plan namespaces upfront
- Perfect for small projects - Ideal when you have limited translation keys
- Direct access - Shorter syntax in templates
Get started
Implementing translations in SuprSend requires three steps:1
Upload translation files
Navigate to Dashboard → Developers → Translations and upload JSON files.
Commit changes to make translations live. Learn more about managing translation files.

2
Set user locale
Set the user’s locale via API using the
$locale
parameter. The locale determines which translation file SuprSend will use for that user’s notifications. Use standard ISO locale codes like en_US
, es_ES
, fr_FR
, etc.3
Use in templates
Add translation keys to templates using the Preview your translations:
{{t}}
tag:-
Open template editor and add
{{t}}
tags - Click Preview (top right corner)
- Select different locales from the dropdown
-
Verify output matches expectations
Using translations in templates
The{{t}}
tag is the primary tool for adding translations to templates. It replaces translation keys with localized content based on the user’s locale:
- Simple translations
- Namespaced translations
- With variables
Basic key replacement - Direct translation key lookup without additional parameters.
Interpolation with variables
Translations can be made dynamic by injecting data from the application. Variables are passed as parameters and interpolated into the translation strings:Pluralization
SuprSend supports plural forms automatically based on the count variable:count=0
→ zerocount=1
→ onecount≥2
→ other
The
count
variable is built-in. Always define zero
, one
, and other
forms for consistent behavior across locales. This logic adapts automatically based on locale rules.Combining translation with other helpers
The{{t}}
tag can be combined with other Handlebars helpers to create more dynamic content:
- Uppercase
- Default values
- Conditional content (if)
- Loops with translations (each)
Text transformation - Applies uppercase formatting to translated text.
JSONNET support
JSONNET is useful when translation behavior depends on dynamic logic — for instance, tailoring messages based on subscription tier or user status. For advanced conditional logic beyond simple Handlebars helpers, use JSONNET expressions directly in your templates: In template:JSONNET is useful for complex business logic. For most cases, simple variable interpolation and Handlebars helpers are sufficient.
Single template architecture
SuprSend uses a single template architecture with translation keys, eliminating the need for separate templates per language:- Multi-template approach
- Single template approach
- Simplifies updates - Change styling once, applies to all locales
- Ensures styling consistency - No risk of layout differences between languages
- Reduces maintenance overhead - Single template to maintain instead of multiple
Managing translation files
- 📋 Workflow
- 🔄 Version control
Translation file workflow:
- Add translated files to the dashboard
- Commit changes to make translations live
- Delete translations by removing files and publishing changes
To delete a translation, you’ll need to publish the changes after removing the files.
Automating translation with CLI
Manage your translations programmatically using SuprSend’s Command Line Interface. Pull, push, and sync translation files with your local environment. For detailed CLI commands and workflows, see our CLI translations documentation.Translation Management APIs
Programmatically manage translations using SuprSend’s Management APIs. Upload, delete, and manage translation files via API. For complete API reference and examples, see our Management API translations documentation.Best practices
- 🔑 Keep keys short**:
auth:login
>authentication_login_button_text
- 🔢 Always define plural forms**:
zero
,one
,other
for consistent behavior - 📄 Maintain
en.json
** as your canonical source - 🏷️ Use translation keys everywhere** — avoid raw text in templates
- 🏢 Don’t translate brand names — keep them consistent across locales
Supported locales
View all supported locales
View all supported locales
SuprSend supports standard ISO locale codes following the
language_COUNTRY
format:Locale Code | Language | Country/Region |
---|---|---|
af_ZA | Afrikaans | South Africa |
ar_AE | Arabic | United Arab Emirates |
ar_SA | Arabic | Saudi Arabia |
ar_EG | Arabic | Egypt |
az_AZ | Azerbaijani | Azerbaijan |
be_BY | Belarusian | Belarus |
bg_BG | Bulgarian | Bulgaria |
bn_BD | Bengali | Bangladesh |
bs_BA | Bosnian | Bosnia and Herzegovina |
ca_ES | Catalan | Spain |
cs_CZ | Czech | Czech Republic |
cy_GB | Welsh | United Kingdom |
da_DK | Danish | Denmark |
de_AT | German | Austria |
de_CH | German | Switzerland |
de_DE | German | Germany |
el_GR | Greek | Greece |
en_AU | English | Australia |
en_CA | English | Canada |
en_GB | English | United Kingdom |
en_IE | English | Ireland |
en_IN | English | India |
en_NZ | English | New Zealand |
en_US | English | United States |
en_ZA | English | South Africa |
es_AR | Spanish | Argentina |
es_CL | Spanish | Chile |
es_CO | Spanish | Colombia |
es_ES | Spanish | Spain |
es_MX | Spanish | Mexico |
es_PE | Spanish | Peru |
es_VE | Spanish | Venezuela |
et_EE | Estonian | Estonia |
eu_ES | Basque | Spain |
fa_IR | Persian | Iran |
fi_FI | Finnish | Finland |
fr_BE | French | Belgium |
fr_CA | French | Canada |
fr_CH | French | Switzerland |
fr_FR | French | France |
gl_ES | Galician | Spain |
gu_IN | Gujarati | India |
he_IL | Hebrew | Israel |
hi_IN | Hindi | India |
hr_HR | Croatian | Croatia |
hu_HU | Hungarian | Hungary |
hy_AM | Armenian | Armenia |
id_ID | Indonesian | Indonesia |
is_IS | Icelandic | Iceland |
it_CH | Italian | Switzerland |
it_IT | Italian | Italy |
ja_JP | Japanese | Japan |
ka_GE | Georgian | Georgia |
kk_KZ | Kazakh | Kazakhstan |
km_KH | Khmer | Cambodia |
kn_IN | Kannada | India |
ko_KR | Korean | South Korea |
ky_KG | Kyrgyz | Kyrgyzstan |
lo_LA | Lao | Laos |
lt_LT | Lithuanian | Lithuania |
lv_LV | Latvian | Latvia |
mk_MK | Macedonian | North Macedonia |
ml_IN | Malayalam | India |
mn_MN | Mongolian | Mongolia |
mr_IN | Marathi | India |
ms_MY | Malay | Malaysia |
my_MM | Burmese | Myanmar |
ne_NP | Nepali | Nepal |
nl_BE | Dutch | Belgium |
nl_NL | Dutch | Netherlands |
no_NO | Norwegian | Norway |
pa_IN | Punjabi | India |
pl_PL | Polish | Poland |
pt_BR | Portuguese | Brazil |
pt_PT | Portuguese | Portugal |
ro_MD | Romanian | Moldova |
ro_RO | Romanian | Romania |
ru_RU | Russian | Russia |
si_LK | Sinhala | Sri Lanka |
sk_SK | Slovak | Slovakia |
sl_SI | Slovenian | Slovenia |
sq_AL | Albanian | Albania |
sr_RS | Serbian | Serbia |
sv_SE | Swedish | Sweden |
sw_KE | Swahili | Kenya |
ta_IN | Tamil | India |
te_IN | Telugu | India |
th_TH | Thai | Thailand |
tr_TR | Turkish | Turkey |
uk_UA | Ukrainian | Ukraine |
ur_PK | Urdu | Pakistan |
uz_UZ | Uzbek | Uzbekistan |
vi_VN | Vietnamese | Vietnam |
zh_CN | Chinese (Simplified) | China |
zh_HK | Chinese (Traditional) | Hong Kong |
zh_TW | Chinese (Traditional) | Taiwan |
zu_ZA | Zulu | South Africa |
Don’t see your locale? SuprSend supports all standard ISO 639-1 language codes and ISO 3166-1 alpha-2 country codes. Contact support if you need help with a specific locale.
Troubleshooting
Even with proper setup, issues may be encountered. Here are common problems and their solutions:Translation not showing up
Translation not showing up
Possible causes:
- Changes not committed
- Invalid JSON format
- User locale not set
- Key missing in fallback files
- Check if changes are committed - Uncommitted translations won’t be used
- Verify file format - Ensure valid JSON syntax
- Check user locale - Confirm user profile has correct locale set
- Review fallback chain - Check if key exists in fallback files
Wrong translation displaying
Wrong translation displaying
Possible causes:
- Incorrect locale format
- Case-sensitive key names
- Outdated version
- Verify locale format - Use
en_US
oren-US
, noten-us
- Check key name - Keys are case-sensitive (
greeting
≠Greeting
) - Review version history - Ensure you’re on the latest version
Template errors
Template errors
Possible causes:
- Incorrect syntax
- Variable name mismatches
- Wrong namespace format
- Syntax check - Ensure proper
{{t "key"}}
format - Variable names - Check variable names match translation file
- Namespace format - Use
namespace:key
, notnamespace.key