Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Translation of content inside a custom liquid block

Translation of content inside a custom liquid block

Patrick33
Tourist
12 0 1

In my theme, I have a few custom liquid blocks. When using the «Shopify Translate & Adapt»-app in order to translate my content from German to French, the content inside the custom liquid blocks is not being translated.

 

Here is one example of the code I have put into one of my custom liquid blocks:

<ul>
<li><b>5% Rabatt</b> bei 2 Stk.</li>
<li><b>10% Rabatt</b> bei 3 Stk.</li>
</ul>

How can I format the code in a fashion that allows the Shopify Translate & Adapt app to translate the content of the custom liquid block?

Replies 2 (2)

richbrown_staff
Shopify Staff
652 96 166

Hi @Patrick33 , take a look at this post where @Matei86 described one way it was done. Broadly we recommend trying to do whatever you need to do with sections, rather than custom liquid, if at all possible.

To learn more visit the Shopify Help Center or the Community Blog.

Patrick33
Tourist
12 0 1

Thank you, Rich. The solution you linked to doesn't solve the problem.

 

Can you tell me if this would work:

 

 

 

{% if request.locale.iso_code == 'en' %}
  English content
{% elsif request.locale.iso_code == 'fr' %}
  French content
{% elsif request.locale.iso_code == 'de' %}
  German content
{% endif %}

Thank you in advance.