Global expansion, localizing content, and selling in multiple currencies and languages
Hi everyone,
My store is translated into 4 languages. When I enter a term using the "search" function in order to find a specific product in my store, the search results will always display in English (the default language), even though the search page is set in a local language i.e. in french.
How can I get the search results to display in the language they were searched?
Btw. I'm using the "Label" Theme.
I'd be immensely grateful for any help - thank you so much!
Solved! Go to the solution
This is an accepted solution.
Hi @Dan_NY , this is because in your theme in in main-search.liquid on line 46 you have action="/search" - and what that's doing is hardcoding the search URL as yourstore.com/search - so it loses the locale when you search (e.g. you want it to stay yoursearch.com/fr/search). To solve this, mention it to your theme developers as it shouldn't be this way, or you can replace it yourself with action="{{ routes.search_url }}".
To learn more visit the Shopify Help Center or the Community Blog.
i was actually hoping for a different answer 😄 but thank you so much for your quick reply!
Hi @Dan_NY @BOOST-STAR , this is not the case. You do not need to modify your theme's code to add language detection and translation abilities.
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hi @Dan_NY , this is because in your theme in in main-search.liquid on line 46 you have action="/search" - and what that's doing is hardcoding the search URL as yourstore.com/search - so it loses the locale when you search (e.g. you want it to stay yoursearch.com/fr/search). To solve this, mention it to your theme developers as it shouldn't be this way, or you can replace it yourself with action="{{ routes.search_url }}".
To learn more visit the Shopify Help Center or the Community Blog.
Oh man !! @richbrown_staff you're a genius !!! I am not familiar with liquid and/or programming at all, but I managed to find the code and changed the snippet and .... Voila!! It works.😄🎉👍🏼
Thank you from the bottom of my heart! I deeply bow to you 🙏🏽 and just gotta say it again: you're a genius !! 😄🙌🏼
Dan
Hi, I'm having the same problem. I'm using the 'Dawn' Theme.
How can I get search results to be displayed in a translated language?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024