Shopify themes, liquid, logos, and UX
Hi,
I've been trying to implemented exactly what is been recommended in this url: Multiple Currency and Language Selector , however, the provided script doesn't work and always throw an error of undefined variable.
So, I tried to make some tweaks utilizing the localization form with Radio Inputs and styling them as a button, however, it doesn't work.
The below code is inserted in the header.liquid file:
<!-- Language Selector -->
<div class="radio-group">
{% form 'localization' %}
{% for language in localization.available_languages %}
<input type="radio" id="{{ language.iso_code }}" onclick="this.form.submit()" name="selector" value="{{ language.iso_code }}"
{%- if language == localization.language %} checked {% endif %}
>
<label for="{{ language.iso_code }}">{{ language.endonym_name }}</label>
{% endfor %}
{% endform %}
</div>
<!-- Language Selector -->
Do you have any idea why the above doesn't work as intended? The form got submitted but the language never changed.
Moreover, why the above link to shopify Dev doesn't work with their provided script.
Thanks,
Hi,
It will be great if someone gave me at least some hint, I can work that out.
Thanks,
Store url: https://www.mryelh.com
Looking forward to some solutions for the above issue.
Thanks.
I have the same problem. I test with currency form https://shopify.dev/api/liquid/tags/deprecated-tags#the-currency-form that is deprecate but it works.
`/localization` doesn't accept a parameter of "selector". You'd need to use `country_code` or `language_code`
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