Skip Navigation

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

Problem: Website only redirects to Browser Language once

Solution: WPML will do this language redirect only once and then not redirect anymore. We do this to allow visitors to still switch languages. If we always push back to the browser’s language, visitors will not be able to manually switch languages after WPML redirects them to the language set by their browser.

This single-time redirect operation resets every 24 hours (which you can change too).

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/#no-redirection-when-refreshing-the-browser

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.

Our next available supporter will start replying to tickets in about 3.95 hours from now. Thank you for your understanding.

This topic contains 9 replies, has 2 voices.

Last updated by yunfeiS 1 year, 5 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
February 20, 2019 at 7:44 pm

yunfeiS

My website couldn't redirect based on Browser Language.
It' was okay before, but now I don't know why.
I give the copy of my website, you could build one and try

February 21, 2019 at 7:43 am #3225460

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

I checked your issue my localhost and it's working properly, also checked your site online and the redirection is also working properly there, so could you please check the issue once again?

If the issue exists, could you please provide me step to step guide to reproduce it on the online site?

Look forward to your reply.

Thanks

February 21, 2019 at 1:56 pm #3227804

yunfeiS

The issue is still here.
The website has threee languages, Chinese/English/French, and I have had Chinese and English page, I haven't made French page yet.
1. Now I set the default language to Chinese, and set the language of my firefox web browser and the language of my phone to English version. When I access my website, It still show a chinese page.
2. I set the default language to English, and my language of my web brower is Chinese, ans it showd a English page

I don't know settings of the website you built and your web browser.

You could access mywebsite, and see which language page will show, now the setting of default language is Chinese.

February 22, 2019 at 9:23 am #3231475

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

For me it's redirecting to the English site, could you please test this issue in a private browser or a different browser itself, also please clear the cache of your site too.

Look forward to your reply.'

Thanks

February 22, 2019 at 1:11 pm #3232467

yunfeiS

I tried on other's computer, it still redirected to other language based on broeser's language.
And I found a prompt showed "redirect_uri parameter error" on other's computer.

February 22, 2019 at 1:23 pm #3232510

yunfeiS

oh I am sorry it worded after i cleared my browser's cache.

February 22, 2019 at 1:48 pm #3232630

yunfeiS

It seems that the first time you access, it could redirect normally. Then you access again it no more redirect.

February 25, 2019 at 12:21 pm #3239633

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I am working on this issue and will respond to you soon.

Thanks

February 25, 2019 at 4:18 pm #3241038

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I debugged this issue further and confirm that this is normal behavior.

WPML will do this language redirect only once and then not redirect anymore. We do this to allow visitors to still switch languages. If we always push back to the browser’s language, visitors will not be able to manually switch languages after WPML redirects them to the language set by their browser.

This single-time redirect operation resets every 24 hours (which you can change too).

https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language/#no-redirection-when-refreshing-the-browser

Let me know if this helps.

Thanks

February 27, 2019 at 10:39 am #3249523

yunfeiS

My issue is resolved now. Thank you!