Skip Navigation

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

Last updated by andreyO 2 years, 4 months ago.

Assigned support staff: Yuri.

Author Posts
April 18, 2018 at 8:27 pm #1679435

andreyO

When I type my site name feurich.com I expect redirection based on browser language, but this is not working. It's always shows the site in it's default language.

April 18, 2018 at 11:04 pm #1680294

Yuri

Hi, I've just browsed hidden link on Chrome configured to English and I was redirected to the "/en" version of the site. Can you test the issue on a clean-cache browser or an Incognito/Private tab? Take notice that after the first time a user is redirected there is a grace period before the cookie is deleted for another redirection to kick in.

April 19, 2018 at 7:24 am #1683246

andreyO

Hello Yuri,

I did tests before with cleared cache and also in private mode. It worked only once in Firefox, but the second time didn't work there either. Now again, first time it switches in 2 seconds to German version, but if I close Firefox and open it again it stays on default hidden link.

I did now fresh tests on Linux/Chrome private mode: it switches to German if I completely leave private mode and start again. In normal mode after I cleared cache it worked only once, the second time it stays on hidden link.

BR,
Andrey

April 22, 2018 at 11:33 pm #1754653

Yuri

Hi, this is the intended behaviour. The functionality does not redirect every single time the user enters the site, it has a cool-off period of at least 24 hours. This period can be extended in the WPML configuration but currently, it cannot be set to lower than 24.

April 23, 2018 at 7:42 am #1758504

andreyO

Hello,

so, if first time I was redirected to German version hidden link and it was my desired destination, I have to switch manually every next time, because redirection doesn't work any more?

Can you elaborate more detailed on that point.
I want to stay at German version, but website stays on English one. And I'm talking about start page.

BR,
Andrey

April 25, 2018 at 1:02 am #1800343

Yuri

Hi, you are correct. The first redirect is the only one that will be triggered in the space of 24 hours (or more depending on the configuration). This is the intended behaviour since this will allow a user that is accessing your site and is redirected to go to the other language even if that language is not the one he uses in his browser.

The functionality is intended to let the user know that there is a language that matches his browser but not to block him from navigating other languages.

April 25, 2018 at 8:34 am #1804481

andreyO

Hello.

I'm confused now. If I have a setting named "remember visitor's language preference for 24 hours", I expect that for 24 hours language preference is saved and I will stay on preffered language. E.g. if user doesn't want to be forwarded to german labnguage again, but selected french, then french shall be saved for 24 hours. This is definetely not a case.

And this is how every normal redirect works. If user navigates to hidden link it should stay on that page (and propably even set german as preffered language). And only if user types in a pure domain name, it redirects to a preffered language (or browser language if 24 h expired).

Anyway, in Chrome redirect works only once after cache was cleared. Every next time (even after 24 hours) website stays on the main page with default language.

BR,
Andrey

April 26, 2018 at 10:50 am #1832548

Yuri

Hi, I understand the confusion with the working of the configuration option, it is a bit misleading and I will address this with our developers. But the fact is that the redirect will only be triggered once every 24 hours (or a bigger period of time if configured).

To test it, you will need to either clear your cookies or use an Incognito/Private tab. I've just redone the test browsing your site with Incognito tabs and I was redirected every time after I terminated the private session. Can you confirm that this is not happening on your end? I ask this because if you don't close all the Incognito tabs you have open the cookie will persist.

April 26, 2018 at 10:53 am #1832595

andreyO

Hello,

with incognito tab it's working fine, but in normal mode it's not triggered after 24 hours.

BR,
Andrey

April 27, 2018 at 12:39 am #1846963

Yuri

Hi, I've just tested the 24-hour redirection restriction on your site and I was correctly redirected after the 24 hours passed. My language cookie was invalidated, I was redirected, and a new cookie was set for another 24 hours.

Can you set up a test for this with a browser that you normally do not use on your computer? This way you will able to make sure that this is working as expected on your side too.

April 27, 2018 at 8:19 am #1853923

andreyO

Hello Yuri,

doesn't matter any more. I've changed browser redirect script myself, so now it's working as it should.
I think WPML team shoudl rethink the concept of browser redirect, as it's not really reasonable.

If someone has an english browser, but wants to read website in german, and default website language is french, then every 24-hours he will be redirected to english website (on first visit), but all other time it will be started in french. Every normal website remembers user preffered language: either last visited language, or which was set through dialog.

BR,
Andrey