Translation Files
How to localize html content
Translation files
A centralised hub for storing all your key translations to use in email, sms and push templates. These feature allows you to easily upload and store your translations
Translation Files simplify the localisation of templates by allowing you to manage multilingual content in a single, centralised system. With Translation Files, you can dynamically serve the correct language version of text in your templates based on your recipients’ locale, reducing the need for multiple templates and improving campaign efficiency.
Key Features
Centralised Management: Upload translation files in the Bird CRM interface.Store translations for multiple locales in a single file, reducing duplication and streamlining updates.
Dynamic Translation Rendering: Automatically fetch the correct translation for a recipient’s locale using Liquid syntax.Include fallback logic to ensure messages always render, even if a translation is missing.
Flexible Format: Use CSV files with row keys for locales (e.g., en-EN
, fr-FR
) and column keys for translation content (e.g., header
, body
).Example file structure:
Header 1 | Header 2 | Header 3 |
---|---|---|
Cell 1-1 | Cell 1-2 | Cell 1-3 |
Cell 2-1 | Cell 2-2 | Cell 2-3 |
Multi-Channel Support: Use translation files across supported channels including email and also SMS and push notifications if enabled.
Locale-Based Personalisation
Dynamically select translations based on the recipient’s locale attribute (e.g.,
contact.attribute.locale
) or other custom attributes.Ensure consistent messaging for global audiences.
Creating and using translation files
Best Practices
Include fallbacks Always include fallback translations in case a locale-specific translation is missing. For example in the below if the locale is missing it will fallback to en-US, and if that is missing default back to the text “Welcome to Bird”.
{% assign header = "welcome_email_translations/header" | t: locale, "en-US" | default: "Welcome to Bird!" %}
Standardise Locale Codes: Ensure consistent locales (e.g.
en-US
,fr-FR
,es-ES
) are used across all translation files.Regular Updates: Keep translation files up-to-date as content changes to maintain consistency across languages.
Test Thoroughly: Regularly test templates after adding or updating translations to ensure they render correctly.
Outcome
Using the example above, a French recipient (locale = "fr-FR") will receive: Header: Bienvenue chez Bird! Body: Nous avons hâte que vous commenciez avec Inbox.
An English recipient (locale = "en-EN") will receive: Header: Welcome to Bird! Body: We can't wait for you to get started with Inbox.
This approach simplifies localisation, ensuring consistent messaging while reducing template duplication.