The strangest liquid behavior!

Highlighted
Shopify Expert
59 0 17

Hi All,

We have Langify installed on one of our shops. And basically, we are trying to do some customizations on the product template. We have translated the product tags and would like to have them appear in the liquid. And we noticed the strangest thing, which I hope I can explain. When you have this code:

{% for tag in product.tags %}
   {{tag}}
{% endfor %}

The tags do not appear translated. But when you have this code:

{% for tag in product.tags %}
   "{{tag}}"
{% endfor %}

The tags appear with their translated version. Does anyone know what type of magic is happening here? I thought Langify were putting their translated versions of the different objects in meta fields. How are the translated tags miraculously appearing in the product.tags object and this is only if we do the for loop described above. The same behavior can be observed if we have the {{tag}} wrapped in some html. For example:

{% for tag in product.tags %}
   <span>{{tag}}</span>
{% endfor %}

The translated tags would each appear in a <span> element.

Thanks

Beautiful and responsive Shopify themes crafted with care at www.kabukithemes.com.
0 Likes