Hello guys, hope you doing good, i want to ask you something about the translation of my shopify website, i added a language selector using code but i choose for example the dutch language it appears to me the dutch version of the web site and i can keep seing the translation when i navigate between some pages like products, blog, contact and request page but i wanted to visit some other pages like wishlist, account and come back to home page, it bring me back to the initial and default language whiich is english ?
Hi @medKal , check with your theme developers - it’s because the links for /account and /wishlist are hard coded and do not use the ‘routes object’. For example in Dutch it should link to /nl/account.
Thank you dear for your answer, yes i agree with you, so i tried to fix that using condition in the hardcoded url but still can’t work properlly, because it keeps duplicate the like evrytime i check into it and for the if condition it does work, for the links for example its “https://ronvandam.myshopify.com/nl/pages/wishlist” and when i clicked on it again it turns into “https://ronvandam.myshopify.com/nl/pages/wishlist/nl/pages/wishlist”
here is the condition i used :
<a class=“header-wishlist” {% if form.current_locale.iso_code == ‘en’ %} href=“pages/wishlist” {% else %} href=“nl/pages/wishlist” {% endif %}>
{{ settings.wishlist_title }}
{% if wishlist.count %}{{ wishlist.count }}{% else %}0{% endif %}
what do you think dear ?
Hi,
You can try this:
{% if shop.locale ==‘en’ %}
<a href=“{{ shop.url }}/{{ shop.locale }}/pages/wishlist”