Skip to main content

Creating Email Templates with Language-Based Conditions

Create email templates that adapt to each customer’s language

Kolleno Support avatar
Written by Kolleno Support
Updated today

This guide explains how to create a dynamic email template that delivers the right greeting or message depending on the customer’s language. This improves communication quality and reduces the need for separate templates.


Creating a New Template

For a full guide on how to create a template please see How to create a template


Adding Language Conditions

Templates support conditional logic.


This allows you to show different text depending on the customer’s stored language.

Use the following structure:

{% if customer.source_original_data.language == "es_ES" %}
Hola!
{% elif customer.source_original_data.language == "fr_FR" %}
Bonjour!
{% else %}
Hello!
{% endif %}

Important clarifications

• The key (language) and the value (es_ES, fr_FR, etc.) both depend entirely on your integration and internal setup.
• Your system may use different language codes or store the language field under a different key.
• Always use == to compare values.
• You can add further conditions for additional languages as needed.


Reviewing Your Template in the Preview

You can check your logic at any time using the Preview panel.
This lets you select a customer and confirm the correct language displays.

If the preview shows the correct output for each test customer, your conditions are set correctly.


Final Steps

Once your template is ready, save it and assign it within your automation workflow.
This ensures future communications are automatically sent in the customer’s preferred language.

Did this answer your question?