A locale is a language plus an optional region tag (Documentation Index
Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt
Use this file to discover all available pages before exploring further.
en, en-AU, es-MX). Spotzee uses locales to pick which template variant a user receives. Add the locales you’ll author content in, and Spotzee handles fallback automatically.
Locale management lives under Settings → Locales and requires the project
admin role. The project default locale is set under Settings → General → Regional defaults.Three layers of locale
Three different locale settings interact at send time:- Project default locale. The fallback used when nothing else matches. Set under Settings → General → Regional defaults.
- Project locale catalogue. The list of locales you’ve added in Settings → Locales. Templates can have variants in any of these.
- User locale. Carried on each user record. Set on creation, updated by syncs or events, or inferred from the user’s browser if you set it client-side via the SDK.
Add a locale
Create a locale
Choose Create locale, then enter a locale key (
en-AU, es-MX, zh-CN, and so on). The form previews the language name from the key as you type. Save.Locale key format
Spotzee accepts BCP-47 language tags. The format is:- Two- or three-letter language code, lower-case (
en,es,zh,pt). - Optional dash plus two-letter region code, upper-case (
-AU,-MX,-CN,-BR).
enmatches any English speaker.en-AUmatches Australian English specifically.es-MXmatches Mexican Spanish specifically.zh-CNmatches Simplified Chinese (mainland China).
^[a-z]{2,3}(-[A-Z]{2})?$. Capitalisation matters: en-au is rejected, en-AU is accepted.
How locale fallback works
Send time: Spotzee picks a template variant for the user using this rule:- Match the user’s locale exactly to a template variant locale.
- If no exact match, fall back to the project default locale’s variant.
- If that doesn’t exist either, the send fails with a missing-template error.
| User locale | Template variants | Project default | Picked variant |
|---|---|---|---|
en-AU | en-AU, en-US | en-US | en-AU (exact match) |
en-NZ | en-AU, en-US | en-US | en-US (project default) |
es-MX | en-AU, en-US | en-US | en-US (project default) |
| (none) | en-AU, en-US | en-US | en-US (project default) |
en, es) rather than the regional level (en-AU, es-MX). Regional variants override the language-level variant only when both exist on the same template.
Set a user’s locale
User locales come from three places:- Sync time. When you upsert a user via
POST /users/batchorPATCH /users, include alocalefield. - Event time. Pass a
localein the user block onPOST /events. Sets the locale if not already set. - SDK. The Spotzee JS, iOS, and Android SDKs read the device or browser locale and write it back automatically.
Delete a locale
You can delete a locale from Settings → Locales that no longer has template variants pointing at it. Spotzee blocks deletion when active templates still reference the locale; remove or migrate those template variants first.Next steps
Build templates
Author per-locale template variants for email, SMS, push, in-app, and webhook channels.
Set up a project
Pick the project default locale that drives template fallback.
Sync users
Push a
locale attribute when you upsert your user base.Concepts
Brush up on Users, Journeys, Segments, Channels, and Providers.