:i18n operator. This allows forms, notifications, case labels, and any text content to be served in the right language automatically — based on the contact’s or user’s locale.
Inline Translations: :i18n
Returns a localized string based on the active locale. The scope must include a locales array that defines the user’s preferred languages, ordered by preference.
locales array in order and returns the first matching translation. If the preferred locale isn’t available, it falls back to the next one in the list.
Variable Interpolation
Translations support full variable interpolation — any penscript variable can be used inside the translated strings:Where to Use :i18n
The :i18n operator works anywhere penscript is evaluated:
- Form labels and descriptions — display element titles in the contact’s language
- Notification content — emails and SMS in the right language
- Welcome and completion pages — localized form instructions
- Case status labels — localized status names for display
- Document generation — language-specific content in generated documents