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 |
---|---|
71 | |
66 | |
65 | |
53 | |
46 |
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023