How to localize E-commerce email templates

Mauri Mitchell asked on January 7, 2020 16:59

We currently have a multilingual store with 3 cultures. EN-US, EN-CA, and FR-CA We are using the e-commerce status notification to customer to send status updates to customers after making a purchase.

Is it possible to include a resource string in E-commerce email templates so that we can display the order data in a French format when someone checks out using the French culture?

Additionally, is it possible to set the E-mail To option differently based on culture?

Recent Answers


Trevor Fayas answered on January 8, 2020 16:28

Yes it is. Email templates allow macros to be used, so you can put in resource macros in:

{$ My.ResourceString $}

https://docs.kentico.com/k11/e-commerce-features/managing-your-store/maintaining-multilingual-stores#Maintainingmultilingualstores-Maintainingmultilingualtexts

For the Email To based on culture, i would recommend making a custom Macro Method and set that as the Email To, it's untested but should work.

Email To: {% Util.GetEcommerceEmailTo(CultureContext.CurrentCulture) %} (something like that)

Check documentation on how to create custom macro methods.

0 votesVote for this answer Mark as a Correct answer

Keio Kwan answered on January 9, 2020 15:13 (last edited on January 9, 2020 15:23)

If the contents are totally written in different langanges, I would preferred to customise order info provider and shopping cart info provider to override template CodeName in different langauages for notification.

(e.g. preset the email templates Ecommerce.OrderNotificationToCustomer.EN_US Ecommerce.OrderNotificationToCustomer.FR_CA, according to current culture context or current user preferred culture, the custom provide override function handle to override the email notification template CodeName for your need.)

You can have different langauage versions of email template for your need.

But you should try using the Kentico suggestion at Configuring e-commerce email notifications

Use customer's culture for emails: Specify if the system sends the customer emails in the shopping cart culture.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.