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

Last updated by Bobby 3 months, 3 weeks ago.

Assigned support staff: Bobby.

Author Posts
June 12, 2019 at 9:05 pm #4007679

aplud-contact-center-e-ti-ltda

I am trying to:When I access the site in the Spanish version and spends a few seconds, the page reloads and returns to the Portuguese language.

Link to a page where the issue can be seen: hidden link

I expected to see: I expected the page to remain in Spanish, even reloading the site.

Instead, I got:Instead, the page reloads itself and changes the language to the Portuguese standard.

June 12, 2019 at 10:57 pm #4007849

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

are you still experiencing this issue ?

when i visit your site i am not experiencing this redirect.

i have now been on the website for over 10 minutes and it has yet to redirect me back to pt.

do you by any chance have browser language redirect on ? (WPML->Languages->Browser language Redirect)

Note that i did check with my browser language set to "PT Brazil" and i was redirected when i visit
hidden link (to stop this deactivate Browser language redirect)

but the redirect happens once and then i am able to switch back to Spanish as expected

June 13, 2019 at 8:54 pm #4016895

aplud-contact-center-e-ti-ltda

Hello, Bobby! All right? Thank you for your support!

So the problem occurs more when I receive the targeting of my other domains.

inhouselatam.com -> Notice that as soon as it redirects to hidden link or hidden link. Automatically he returns to the Portuguese site, and he should stay in Spanish.

Can you tell me what it can be?

see the video of what happened
hidden link

June 13, 2019 at 11:55 pm #4017415

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

That is a correct behavior.

I am guessing your browser's language is set to Portuguese Brazilian

that is why when you visit the site it redirect to .br

if you switch back to Spanish then the browser will remember your decision and next time it will remember to not redirect (possibly for 24 hours or as long as you have set it within WPML->Languages)

for me since my browser is set to English it remains in ?lang=es with no redirect

here is a screencast
hidden link

please let me know if you have any further questions

June 28, 2019 at 7:52 pm #4110093

aplud-contact-center-e-ti-ltda

You're right! It's the same, I did the test and it happened. Do you know how to disable this language identification option in the browser?

June 28, 2019 at 11:47 pm #4110291

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

You can disable the browser language redirection by going to WPML->Languages->Browser language redirection and setting it to " Disable browser language redirect"

If you are interested in the redirect function here is an old ticket on how to enable "GeoLocation Redirect"

do note that this is not an out-of-the-box feature of WPML and it will require some custom work which WPML at the moment cannot cover within the support forum

=> https://wpml.org/forums/topic/automatic-redirect-based-on-geolocation/