Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
I have a widget that I added in a Custom Liquid on a page, and I want to be able to change change if depending the language of the user, is there like a class for eng, etc that I can use to show and hide content?
I want to be able to hide the spanish widget when the user is on english.
Thank you.
Solved! Go to the solution
This is an accepted solution.
@12alberto34 Try adding below condition in your Custom Liquid and let me know whether it is helpful for you.
{% if shop.locale == "es" %}
<Paste spanish user widget code here>
{% elsif shop.locale == "en" %}
<Paste english user widget code here>
{% endif %}
Please provide your support by click "Like" and "Accepted" if our solution works for you. Thanks for your support.
This is an accepted solution.
@12alberto34 Try adding below condition in your Custom Liquid and let me know whether it is helpful for you.
{% if shop.locale == "es" %}
<Paste spanish user widget code here>
{% elsif shop.locale == "en" %}
<Paste english user widget code here>
{% endif %}
Please provide your support by click "Like" and "Accepted" if our solution works for you. Thanks for your support.
Thank you very much, I was searching for this! it worked
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024