Duplicate templates per language clutter the codebase
welcome_en.html, welcome_de.html, welcome_fr.html — for every template, every locale, every update.
Include a locale in your event payload. else.events routes to the right language template automatically. One API call, any number of locales.
welcome_en.html, welcome_de.html, welcome_fr.html — for every template, every locale, every update.
Your backend has to determine the user's locale, select the right template file and pass both to the email provider.
A typo fix in the French welcome email still needs a commit and a deploy if templates live in your repo.
When a locale is not yet translated, the fallback to English is custom logic you have to write and test.
Add a locale field to your event. else.events rules match on it and select the correct language template automatically.
If a locale is not yet available for a template, else.events falls back to the configured default — no custom code needed.
Each template can have multiple locale variants. Edit or add a translation without touching your application.
Your application fires a single event. Locale routing is a configuration concern, not a code concern.
// locale field drives template selection
{
"type": "user.signed_up",
"locale": "de",
"user": { "email": "nutzer@example.com", "name": "Alex" },
"data": {
"app_name": "MyApp",
"getting_started_url": "https://app.example.com/start"
}
} else.events matches locale = de, selects the German welcome template and delivers it. Falls back to the default locale if a German variant does not yet exist.
One event, one API call. else.events handles locale routing and fallback automatically.