Collapse Menu
Classic Docs
Order Page Config, Design and Page Flow
Advanced Features
Subscriptions and Saasy
Contact Support

Translating Notification Emails

If you commonly have customers in countries that speak languages other than English, you might want to customize your Notification emails to display in other languages. Using information from our Geo-location service, which detects a customer's IP location, the language is automatically set when a customer places an order, and is set to the two letter language ISO 639-1 code. To accomplish translations in your Notifications, you can either set up Phrases or include template code logic in the Notifications. 

If you commonly have customers in countries that speak languages other than English, you might want to customize your Notification emails to display in other languages. Using information from our Geo-location service, which detects a customer's IP location, the language is automatically set when a customer places an order, and is set to the two letter language ISO 639-1 code. To accomplish translations in your Notifications, you can either set up Phrases or include template code logic in the Notifications. 

Using Phrases for Translations

Once you have set up an email notification, go to SpringBoard's Store Home » Notify and click on the Notification that you want to translate. Click on the Phrases tab.

notify.png 233.png

Here you can translate phrases that are used in the Notification, by adding ??.tagPhrase=translatedphrase, where ?? is replaced with the two letter language ISO 639-1 code. When creating translations, make sure to set a default phrase, typically in English, which will be used for all other languages. For example, the following code with translate Hello into Bonjour (when French is detected), Hola (when Spanish is detected), and Guten Tag (when German is detected). For all other languages, it will display Hello.

HelloPhrase=Hello
fr.HelloPhrase=Bonjour
es.HelloPhrase=Hola
de.HelloPhrase=Guten Tag

To reference this phrase in your email notification, click on the Email (Text) or Email (HTML) tab, and use the tag, <message value="HelloPhrase" />, and do not include a language prefix.

An example of how this would be used to greet your customer is below.

<message value="HelloPhrase" /> #{order.customer.firstName},

Another way to do this, which is better used if the phrase contains dynamic information from one of our variables, is to go to the Phases tab and enter the following:

Greeting=Hello #{name}
fr.Greeting=Bonjour #{name},
es.Greeting=Hola #{name},
de.Greeting=Guten Tag #{name},

To reference this phrase in your email notification, click on the Email (Text) or Email (HTML) tab, and use the tag, <message value="Greeting" name="#{order.customer.firstName}"/> .

You can also translate the Email Subject of your notification using Phrases, as shown below.

230.png229.png

Using Template Code Logic for Translations

Another way to translate your notifications is to use logic inline with the text of the email. In the Email (Text) or Email (HTML) tab, use the following code where ?? and xx are replaced with the two letter language ISO 639-1 code and where you put in the translated versions, as well as the default text, for your email.

<message>
<en>
Text in English. Additionally, the first language is the default language when another language cannot be found.
</en>
<??>
Text translated into other language of ??.
</??>
<xx>
Text translated into other language of xx.
</xx>
</message>

For example, the following code will translate from English to German or Spanish, when appropriate. Note: The first language will be the default language when another language cannot be found.

<message>
<en>
Hello #{order.customer.fullName},
Download here: #{orderItem.fulfillment.file.url}
Thank you very much.
</en>
<de>
Guten Tag #{order.customer.fullName}, 
Download hier: #{orderItem.fulfillment.file.url} 
Danke schön. </de> 
<es>
Hola #{order.customer.fullName}, 
Descargar aquí: #{orderItem.fulfillment.file.url} 
Muchas gracias. </es>
</message>

We're Here to Help

If you need assistance with setting up translations in your notifications, please open a support ticket.