Liquid, JavaScript, themes, sales channels
The ML Shopify I am managing has main language DE and second language IT with the Debutify theme. I'm struggling both with text string translations (locale.json), inshop translations (articles etc.), theme sections translations as well as email templates translations like those for order confirmation. The logic of Shopify core, Theme ML support, ML Apps and custom edits regarding MultiLanguage is not logical and very difficult to track and maintain.
For the new order notification I changed the topic to change the beginning, include total price and city:
Shopify-Bestellung {{ name }} {{ total_price }} - {% if customer.name %} {{ customer.name }},{% endif %} {{ address.city }} {% if has_high_risks? %} (Betrugsrisiko){% endif %}
In the into section about the customer and time I edited to have custom time (see strftime) and include customer email and phone (see email-variables)
{% assign current_date = date | date: "%d. %b ." %}
{% assign current_time = date | date: "%H:%M" %}
{% if customer.name %}
{{ customer.name }} hat die Bestellung {{ name }} am {{ current_date }} um {{ current_time | strip }} aufgegeben.
<br>{{email}}, Tel. {{billing_address.phone}}, {{shipping_address.phone}}
While the customer notifications in the second language IT seems to work as long as you do not edit any code, it is very difficult to understand which notifications have been customized (I could not see any Admin-GUI indication).
So as one of the main suggestions for onlineshops is to customize the order confirmation to give the client a more personal message, I did that in DE and only later found out that also IT clients now receive this message (code) and automatic notification translation is not working in that case. Bummer.
I consulted many sites and found some insight on weglot Translate your Shopify email notifications, langify Translating Notifications. The code to use in any customized email templates seems to be like this
{% case attributes.lang %} {% when 'it' %} ITALIAN CODE {% else %} GERMAN CODE {% endcase %}
I have the following questions:
Solved! Go to the solution
This is an accepted solution.
Some necessary progress for ML. Under myshopify.com/admin/settings/notifications now the secondary languages can be edited.
The first code is to correct regarding two variables:
Shopify-Bestellung {{ name }}: {{ total_price | money }} - {% if customer.name %} {{ customer.name }},{% endif %} {{ shipping_address.city }} {% if has_high_risks? %} (Betrugsrisiko){% endif %}
The
{% case attributes.lang %}
code seems to work as far as I could test it for DE - not sure how to test the second language IT without doing an actual order in that language.
This is an accepted solution.
Some necessary progress for ML. Under myshopify.com/admin/settings/notifications now the secondary languages can be edited.
I don't see this option to edit the secondary language templates.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024