Localise (translate) notifications

chiaravet
New Member
1 0 0

Dear Community,

I'm working on localising a shop. At the moment, the main language of the shop is German, with additional languages being English, French and Spanish.

I would like to start offering the shop in all four languages (I'm using an app for it), but the notifications in German for customers who have language set to "de", and English for everyone else.

I can see that Shopify already adds under "Additional Details" of an order a language attribute "de" for when they place the order from the main site, "en" for English and so on.

I then added in the order confirmation email the following code, but with no luck, since I always get the email in English, being (I guess) the content I set for the {% else %} case.

{% case attributes.language %}
{% when 'de' %}
MY GERMAN CONTENT
{% else %}
MY ENGLISH CONTENT
{% endcase %}

I also tried to use {% case attributes.lang %}, but that also brought me nowhere. Ideas?

Thank you!

Chiara

0 Likes