Background of the issue:
I'm using Relevanssi Ajax Search on our website hidden link. I added this code: function change_relevanssi_engine_to_wp_query() { return 'wp_query'; } add_filter( 'relevanssi_live_search_mode', 'gital_themechange_relevanssi_engine_to_wp_query' ); We are using WPML.
Symptoms:
When I search in Chrome from a Swedish page, the language defaults to English, but it works correctly in Firefox.
Questions:
What could be causing the language to default to English in Chrome when using Relevanssi Ajax Search with WPML?
1) What is the code that you are using to fetch posts?
Seems that query_posts()is not the correct function to use here. You should be using get_posts().
2) Does the issue happen when only WPML plugins are active with Relevanssi and when using WP default theme, so without any extra custom code or plugin? If needed you can use your custom template for search there, just keep it simple, since we can not debug custom solutions.
I have now installed two plugins. Relevanssi and Relevanssi Ajax Search. I have put the search bar on this page: hidden link and it seems to work correctly there.
It could be then something related to your environment or website.
If the issue still happens with only WPML plugins and Relevanssi, all others disabled, and using WP default theme, without additional custom code / cache and etc, please share access to the staging site so we can check further or provide us a copy of the website and we will check further.