Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to understand how redirects based on IP and/or Browser Settings work when using the GeotargetingWP plugin in combination with WPML. They are interested in knowing which of the two (IP or Browser Setting redirects) has higher priority and if it's possible to alter this priority or create combination rules.
Solution:
We explained that the redirect option in WPML is managed with JavaScript and its priority depends on whether the GeotargetingWP plugin triggers before the JavaScript or not. We clarified that WPML does not have an option for browser redirects, so combined rules are only possible if GeotargetingWP allows for them, which we believe is not the case. We recommended checking the GeotargetingWP documentation for more information:

We also pointed out that the Lite version of GeotargetingWP will not work with WPML and suggested checking the following WPML hooks for potential enhancements or integration with Geotargeting plugins:

If the solution provided here is not relevant due to being 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 you still need assistance, please open a new support ticket with us.

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 3 replies, has 3 voices.

Last updated by Bruno Kos 8 months, 1 week ago.

Assisted by: Bruno Kos.

Author Posts
May 2, 2024 at 8:38 am #15586175

jelleS

Hi,

We want to have a better understanding about redirects based on IP and/or Browser Setting.
One of our clients want to implement this but has some questions about this, to give a good answer we need to understand it more.

We want to use "GeotargetingWP" plug-in in combination with "WPML", in GWP you can set rules and redirects based on IP. But in WPML you can also set a redirect based on Browser Setting. Which of the two has a higher priority and can you alter this priority. Or can you make combination rules with IP and browser settings.

Looking forward to hear from you.

With best regards,
René

May 2, 2024 at 11:21 am #15586793

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+01:00)

Hi,

thanks for contacting us.

The redirect option in WPML is managed with a JavaScript, so it depends if the plugin triggers before the JS or not.

There are no option for the browser redirect in WPML, so combinated rules are only possible if Geotargeting WP allows for them, which I think it's not the case.
I would recommand checking their documentation hidden link

Also please remind the Lite version of Geotargeting WP won't work with WPML

May 2, 2024 at 11:53 am #15586967

jelleS

Browser redirect is supported by WPML: https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/

Then we need to have a look at Geotargeting WP, thanks

May 2, 2024 at 1:23 pm #15587491

Bruno Kos
Supporter

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+01:00)

I suggest you also check:
https://wpml.org/wpml-hook/wpml_enqueue_browser_redirect_language/
https://wpml.org/wpml-hook/wpml_enqueued_browser_redirect_language/

Perhaps it will help to enhance the functionality or combine with GeoTargeting plugins.