Support » Plugin: Polylang » Problem with switching language in polylang

  • I have a problem with polylang.

    For example, the default language is PL and additional EN and DE. Everything is good, but when you switch to EN and close the browser, after entering the main domain again, EN is active. Clicking on PL it does not want to switch anything and in the address bar is always http://www.mypage.pl/en/. Even if I remove it from the address en it goes back to it.

    Cleaning cookies in the browser does not give anything.

    What may be the problem? How to fix it?

    Thanks in advance for reply.

    • This topic was modified 6 months, 1 week ago by  wolekpl.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    I have the exact same problem. The only solution I found now is to uncheck “hide default language in URL”. My default home is accessible by /fr/accueil (previously /).

    There are still a problem with the browser language detection, but user can at least choose and read each home I have…

    ChrisL

    (@chrslcy)

    Similar issue here.

    My site has English served over a .net domain and Chinese served over a .cn domain. Until recently it worked fine.

    However, I’m now unable to visit the .cn domain as the site switches automatically to the .net, even when pressing the Chinese flag to view the Chinese translation.

    Until fixed, this renders the plugin less than useless.

    ChrisL

    (@chrslcy)

    I should add: this problem only affects the homepage. On other pages, the language switcher works. Basically unable to visit .CN homepage without it switching to .NET homepage.

    wolekpl

    (@wolekpl)

    I solved the problem by removing the following code from the htaccess file:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 1 month"
    </IfModule>

    Maybe it will help someone 🙂

    ChrisL

    (@chrslcy)

    Thanks for the update. Unfortunately, that code doesn’t appear in my htaccess.

    nurbek2020

    (@nurbek2020)

    I noticed that on panel language swicher is not working. Only working when someone loged in or in admin function.

    From any page if you click on another language it throws to the main page (default language).

    morino

    (@morino)

    @gdebrion

    Your idea seemed to work for me, not sure since only time will tell. But kudos and thanks.

    URL mods that might be necessary

    “The only solution I found now is to uncheck “hide default language in URL”. My default home is accessible by /fr/accueil (previously /).

    There are still a problem with the browser language detection, but user can at least choose and read each home I have…”

    • This reply was modified 2 weeks ago by  morino.
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.