This thread is resolved. Here is a description of the problem and solution.
Problem:
The client has created a language landing page and wants the website to remember the user's language choice using cookies, so it doesn't prompt for language selection on subsequent visits.
Solution:
We recommend the following steps:
1. Ensure that the 'Language filtering for AJAX operations' is enabled in WPML under WPML >> Languages. This setting allows WPML to set the language code in the cookie 'wp-wpml_current_language'.
2. Use a PHP if/else statement to read this cookie and redirect the user to the correct language page based on their previous selection.
For more details on handling cookies with WPML, please refer to our documentation:
https://wpml.org/documentation/support/browser-cookies-stored-wpml/
https://wpml.org/documentation/getting-started-guide/language-setup/enabling-language-cookie-to-support-ajax-filtering/
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at https://wpml.org/forums/.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
