Configuring Multilingual Email Templates in 1C-Bitrix
Multilingual websites built on 1C-Bitrix send system emails — order confirmations, password resets, registration notices — but often do so in only one language. A user selects the English version of the site, places an order, and receives the confirmation email in Russian. The purpose of configuring multilingual email templates is to eliminate exactly this situation.
How 1C-Bitrix Selects an Email Template
System mail events (type \Bitrix\Main\Mail\Event) are stored in the b_event_type table. Each event has a LID — a binding to a language. For a multilingual site, a separate event template must be created for each language.
Example: the SALE_NEW_ORDER event (new order). By default, there is one template with LID = ru. For the English version, we create a second template for the same event with LID = en. When sending the email, 1C-Bitrix selects the template based on the LID of the site where the order was placed.
Critical note: the LID in the template is a site identifier (b_lang.LID), not the system language. On multilingual sites with a single SITE_ID and multiple languages configured via Bitrix\Main\Application::getInstance()->addApplication() or a language-specific SITE_ID — verify how multilingualism is structured in the specific project before assuming how template selection works.
Creating Templates for Multiple Languages
Go to Settings → Mail Events → Mail Event Types. For each system event, create templates:
- Open the event (e.g.
SALE_NEW_ORDER) - Add a new template via "Add Template"
- In the "Site" field, select the language version (or
SITE_IDif using separate domains) - Fill in the subject and body of the email in the target language
For a technically sound implementation, do not duplicate HTML markup in every template. Instead:
- Extract shared elements (header, footer, button) into a PHP template included via
#INCLUDE_FILE# - Parametrise texts using event variables
Variables and Localisation of Values
Standard event variables (#ORDER_ID#, #PRICE#) are substituted identically across all languages. However, some values require localisation. For example, the order status "Обрабатывается" in Russian versus "Processing" in English.
To localise dynamic values, the event handler (OnBeforeEventAdd) retrieves the language context and substitutes translated strings:
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'main', 'OnBeforeEventAdd',
function (\Bitrix\Main\Event $event) {
$fields = $event->getParameter('FIELDS');
$lang = $fields['LID'] ?? 'ru';
// Translate order status
$fields['ORDER_STATUS'] = getLocalizedStatus($fields['ORDER_STATUS_ID'], $lang);
$event->setParameter('FIELDS', $fields);
}
);
Date and Number Formatting
In multilingual emails, a date like "13.03.2026" is correct for a Russian-speaking user, but a German-speaking user expects "13. März 2026" and an English-speaking user expects "March 13, 2026". Use a variable containing the pre-formatted value, generated in the handler based on $lang.
Number formatting: an order total of "1 499,90 ₽" versus "€ 24.99" involves different thousand separators, different currency symbols, and different symbol positions. Use \Bitrix\Currency\CurrencyManager::getCurrencyFormat() with language context.
Common Issues
Encoding. Templates containing Cyrillic characters must be saved in UTF-8. If a template was saved in CP1251 via the legacy admin interface, emails will arrive with garbled characters in part of the text.
Content-Type header. 1C-Bitrix sends text/html; charset=UTF-8 by default. This is correct for multilingual templates. However, if mail is sent via an external SMTP service (SendGrid, Mailgun), verify that the charset is not being overridden by the SMTP module settings.
Estimated Timelines
| Task | Timeline |
|---|---|
| Localisation of system emails (5–10 events, 2 languages) | 2–5 days |
| Development of a unified template system for 4+ languages | 1–2 weeks |
Pricing is calculated individually after auditing the existing templates and the site's language structure.







