Shopify themes, liquid, logos, and UX
I'm working on getting the website ready from just Dutch to multi-language. We used to have the value "Vanaf" hardcoded as part of the price meaning From in Dutch. Trying to change this as an actual translatable field but whatever I try it keeps saying translation is missing. Tried both via the language editor and via the NL.JSON itself and it certainly is there.
The Theme is supply and the price.liquid is mostly as it comes with the theme. The code I have is below. In both the en.default.json and the nl.json the translations show correctly.
{% assign formatted_price = price | money %}
{% comment %}
Unless this store uses multiple currencies,
if we apply a special style to cents,
we will wrap them in a sup (superscript) element.
{% endcomment %}
{% unless shop.money_format contains 'money' or shop.money_format contains '.' %}
{% if settings.superscript_decimals %}
{% if shop.money_format contains '{{amount}}' or shop.money_format contains '{{ amount }}' %}
{% capture formatted_price %}{{ formatted_price | replace: '.','<sup>' }}</sup>{% endcapture %}
{% elsif shop.money_format contains '{{amount_with_comma_separator}}' or shop.money_format contains '{{ amount_with_comma_separator }}' %}
{% capture formatted_price %}{{ formatted_price | replace: ',','<sup>' }}</sup>{% endcapture %}
{% endif %}
{% endif %}
{% endunless %}
<small aria-hidden="true">{% if product.price_varies %} {{ 'Product.from' | t }}
{% endif %}{{ formatted_price }}</small>
<span class="visually-hidden">{% if product.price_varies %} <p> {{ 'Product.from' | t }} </p>
{% endif %}{{ price | money }}</span>
User | RANK |
---|---|
113 | |
85 | |
69 | |
66 | |
46 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022