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 1 year, 11 months ago by wolekpl.
Viewing 15 replies - 1 through 15 (of 16 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…

    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.

    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.

    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 🙂

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

    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).

    @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 1 year, 5 months ago by morino.
    perituswebdesign

    (@perituswebdesign)

    +1 I’m having the exact same issue.

    @gdebrion Your solution worked very well, but it’s not a long-time solution, it’s a hack.

    Is there an official solution?

    perituswebdesign

    (@perituswebdesign)

    In my case the problem were some left-over WP-Super-Cache .htaccess-Rules. When I removed those everything started to work again.

    Hello everyone!
    I have a post preview on the main page. Main version selected English, and the second language is Russian.
    When I go direct to the technicstory.com from the SERP, it always redirects me to the /ru/. Also, when I try to switch language from the widget, it won’t.
    I also check redirects here https://wheregoes.com/ and there is no redirects http://prntscr.com/mm6iwc

    I come up with the idea that plugin detects browser language and won’t switch to the language different from browser language.
    Solution to me was a deactivating of Detect browser language option. http://prntscr.com/mm6pxj

    Hi!

    I had the same problem as you all, I put 2 languages (FR and EN) and after switching to EN, the text would appear in English, inside the French page.

    I did deactived the Detect browser language and it fixed the problem, thank you @andrew488 !

    I have similar issues. Automatic language detection is not working.

    * I get the default language (EN) regardless of the language settings in my browsers.

    * If I change language and the exit, go back, I still get the default language. It seems as if the cookie is not set.

    * Also, when I have automatic language detection on, I can’t switch languages on my iPhone, but with it switched off, it works.

    I have Polylang Pro with “support” so I have reached out to them and hopefully they’ll get back to me.

    • This reply was modified 5 months, 2 weeks ago by thomasnorden. Reason: Added e-mail notification for replies
    • This reply was modified 5 months, 2 weeks ago by thomasnorden.
    Roeland Sanctorum

    (@roelandabovesecondbe)

    Hi,

    1st time I encounter this problem:
    – languages NL and FR installed, all content translated, menu’s created in both languages
    – default language is NL
    1. I click in any of my default NL pages on the language switcher “FR” and the content changes to FR but menu remains in NL until I refresh page, only then menu changes to the new selected language

    2. When I click on any of the content pages in the menu that is shown the browser always returns to the homepage

    – I have deactivated all plugins, no change (except the polylang of course)
    – I have tried to deactivate the AJAX as template has function to note the concerned URL’s where AJAX doesn’t need to function, no change
    – I have read many of WP blogs, no ready solutions other than the ones I have tried already
    – I have read your documentation, no solution found

    Could you tell me what to do next?

    Many thanks,
    Roeland Sanctorum
    AboveSecond

    Hi guys,
    Polylong really sucks… I have tried that million times and there is always a problem! The only solution is to uninstall this plugin, all set to default, clear all caches, wait for it a bit to get back your old settings and try another one.

    Sincerely
    Jakub

    istevkovski

    (@istevkovski)

    @wolekpl Thanks! It helped me 🙂

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.