Google Tag Manager

Forum Discussion

jgammon's avatar
jgammon
Active Member
2 years ago

Adding New Language for Braze Campaigns

Hi Braze experts, I'm hoping you can point me in the right direction as my company expands into new countries and languages. Is there an easy way to create a language variant for a Braze campaign without having to create a completely separate campaign? For example, I would like to add a Spanish variation of the same copy listed for the default English version. Goal is to have both language variations ladder into one overarching campaign with one set of performance metrics. Thanks in advance for your help!

  • Hi jgammon 

    The simplest way to have multiple languages in one campaign is to use liquid language. In this first example, I am using the Braze attribute 'most_recent_locale' to detect the language, and then if it is Spanish, it will display Spanish, if not, it falls back to English with the 'else' statement.

     

       
    {% if {{${most_recent_locale}}} == 'es_ES' %}
        Spanish translation goes here
    {% elsif {{${most_recent_locale}}} == 'pt_PT' %}
        Portuguese translation goes here
    {% else %}
        English translation goes here
    {% endif %}

     

    To make it even simpler, you can also use {{${language}}} as the filter, but I choose 'most_recent_locale' as it filters down further to the locale of the language. For example, pt_PT (Portuguese Portugal) vs pt_BR (Portuguese Brazil) can have significant differences, rather than just using Portuguese broadly as a filter. How you approach this would need to be a business decision. 

    There is more info on that here:
    Supported Liquid Personalization Tags (braze.com)

    Another option is to store your translations in content blocks and then serve up the relevant language block in your messages. Similar liquid but it pulls in content blocks instead.

     

    {% if {{${most_recent_locale}}} == 'es_ES' %}
        {{content_blocks.${spanish_translation}}}
    {% elsif {{${most_recent_locale}}} == 'pt_PT' %}
        {{content_blocks.${portuguese_translation}}}
    {% else %}
        {{content_blocks.${english_translation}}}
    {% endif %}

     

    I hope this helps. 😊



  • DavidO's avatar
    DavidO
    Strategist II

    Hi jgammon 

    The simplest way to have multiple languages in one campaign is to use liquid language. In this first example, I am using the Braze attribute 'most_recent_locale' to detect the language, and then if it is Spanish, it will display Spanish, if not, it falls back to English with the 'else' statement.

     

       
    {% if {{${most_recent_locale}}} == 'es_ES' %}
        Spanish translation goes here
    {% elsif {{${most_recent_locale}}} == 'pt_PT' %}
        Portuguese translation goes here
    {% else %}
        English translation goes here
    {% endif %}

     

    To make it even simpler, you can also use {{${language}}} as the filter, but I choose 'most_recent_locale' as it filters down further to the locale of the language. For example, pt_PT (Portuguese Portugal) vs pt_BR (Portuguese Brazil) can have significant differences, rather than just using Portuguese broadly as a filter. How you approach this would need to be a business decision. 

    There is more info on that here:
    Supported Liquid Personalization Tags (braze.com)

    Another option is to store your translations in content blocks and then serve up the relevant language block in your messages. Similar liquid but it pulls in content blocks instead.

     

    {% if {{${most_recent_locale}}} == 'es_ES' %}
        {{content_blocks.${spanish_translation}}}
    {% elsif {{${most_recent_locale}}} == 'pt_PT' %}
        {{content_blocks.${portuguese_translation}}}
    {% else %}
        {{content_blocks.${english_translation}}}
    {% endif %}

     

    I hope this helps. 😊