Everytime I do a search on a French page (English is primary), the resulting page reverts to English and the results are in English as well. Any way to keep French throughout the whole search experience?
Thanks.
Everytime I do a search on a French page (English is primary), the resulting page reverts to English and the results are in English as well. Any way to keep French throughout the whole search experience?
Thanks.
Hello @iolo72 ,
Check the action of the search form and replace it with this
action=“{{ routes.search_url }}”
Thanks
@Guleria Hello, thanks for the reply. Assuming that you’re talking about search-bar.liquid, it already has that line in there.
It looks like {{ routes.search_url }} correctly puts the localization info in the form when it’s rendered on the page (action=“/fr/search”) but as soon as I hit enter (or click the magnifying glass) to search, the result page reverts back to English.
@iolo72 do you use any apps for search? And what theme are you using?
@richbrown_staff Not sure which theme but it seems to be using Search & Discovery app.
Thanks. You’ll need to share the store either here or by DM to me to help diagnose
What apps are you using?
Hiya, we’ve had a quick look. On line 3991 of your theme.js file we think you might be overriding the route with a hardcoded /search. It’s a custom theme so we can’t go much deeper, but this would be a place to investigate. The search works in French if you go to mywebsite.com - This website is for sale! - mywebsite Resources and Information.

@richbrown_staff Thanks for that info. I’m trying to look into that but it seems like the CDN cached .js file is not updating the changes I saved? Upon searching the community there seems to be an issue with that. Is there a way to circumvent this problem? It seems like it’s been going on for a while.
@richbrown_staff With that CDN cache issue aside (which I found a workaround and posted here) I managed to edit theme.min.js to make it work. Much appreciated for pointing me to the solution!
Great!