Skip to content Skip to sidebar

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.

This topic contains 2 replies, has 1 voice.

Last updated by Noman 1 week ago.

Assisted by: Noman.

Author Posts
January 13, 2026 at 5:50 am #17723551

Quick Easy

I have already created a language landing page in HTML (hidden link). After selecting a language (e.g., English - hidden link), the next time the website directly redirects to the previously selected language (hidden link) and does not prompt the user to select the language again. Can I save this preference using cookies?

January 13, 2026 at 7:13 am #17723633
Quick Easy

We also need to know how to redirect the homepage section button link to the respective language page link.
Currently, when the URL is hidden link, the button link redirects to the respective English page. Similarly, when the URL is hidden link, the button link redirects to the corresponding German page.

New threads created by Noman and linked to this one are listed below:

https://wpml.org/forums/topic/button-links-translation-issue/

sdsd.png
January 13, 2026 at 2:03 pm #17725896

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support.

- Sorry, the built-in WPML feature cannot redirect visitors from a static HTML/PHP landing page based on their previous language choice. Yes, You may achieve this with custom code, which is beyond our standard support scope.

However, you may try the following approach:

1. When a user selects a language, WPML sets the language code in the cookie wp-wpml_current_language (if Language filtering for AJAX operations is enabled under WPML >> Languages).

2. You can use a PHP if/else statement to read this cookie and redirect the user to the correct language page.

For more details, please refer to the WPML 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/

- For internal link translation issues, it’s a different issue/question and will be handled separately as per our support policy. I've created a new ticket for this at: https://wpml.org/forums/topic/button-links-translation-issue/

Kindly let me know the results,
Thank you