What’s happening is when you are logged into the website, the language code comes back with the correct language. When logged out of the website, it seems to only come back with the default language (en) when making an AJAX call through WordPress.
AJAX should be detecting the current language even if logged out.
The language parameters are not getting passed to the AJAX request when logged out.
Is there any documentation that you are following?
Documentation for this issue is unclear.
Is there a similar example that we can see?
Visit the link below and click on "Graine" and you will see English results populate. But when logged into the site, French results appear.
We are moving towards enabling this setting by default in future versions of WPML. It was disabled by default due to issues with some caching plugins a while back.
Please do let us know if you have any further issues!
Best,
Izzi
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.