Support » Plugin: Polylang » Cannot Return to Default Language Homepage

  • Resolved Jamie McGrory

    (@plxjmcgrory)


    I have set several languages across my website using Polylang. Default language is ‘en’. However after selecting a non-default language, for example ‘zh’, I cannot return to the ‘en’ homepage. I can go to other languages homepages (‘es’,’pt’), but whenever trying to access the homepage via the language switcher/manually in the url bar it defaults to ‘zh’.

    My settings:
    Default Language: “en”,
    Detect browser language: Deactivated (same behaviour when activated)

    This behaviour has been seen across all browsers except incognito, so I’m not sure if a tracking cookie has been assigned for the session? It’s not limited to one non-default language, my machine is tied to ‘zh’ for the homepage whilst another is tied to ‘pt’ (despite the default being ‘en’).

    ALL translatations default and non-default are available on every page EXCEPT the homepage, so I can use ‘en’ everywhere except there it seems. My homepage is set to a static page (as is my news). There is no issue with the news, though there are no other language variations of it.

    Using both the latest version of polylang and wordpress (experiencing this BEFORE I updated to latest polylang ver).

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Any progress here? I am having the same issue!

    Yes actually, by completely clearing my browser cookies AFTER changing settings it seems like Polylang actually starts paying attention to the default language.

    I think it’s maybe that when the Detect browser language is enabled it might create an overriding setting in the cookies for the homepage (???) or at least pages with no ‘/xyz/’ following urls to hook onto.

    It would maybe explain why deactivating it did nothing (the cookie was already presently set for the homepage) and why clearing cookies before changing my Polylang settings did nothing, just make sure all your settings are set to how you want it before you clear your browser cookies (default language/static homepage set/browser lang detect deactivated) and hopefully you get the same results.

    Thanks for the quick reply.

    I still can’t seem to get it to change – cookies deleted before and after setting changes and still being forced to French (other users going to German) when trying to access English (default) homepage.

    It’s ok when switching to other languages and fine on all none homepages!

    Could you explain the process you did please? What settings did you change?

    Sounds like exactly what I had going on, do you also get an issue when setting a static homepage where after setting one for one language, setting one for another overwrites the others?

    My process:

    1) Make sure wp core/plugin are up to date
    2) Make sure your homepage has all the required translations
    3) Change Settings to:

    Default Lang: ‘en’,
    Detect browser language: Deactivated,
    URL Mods > Language set from content: false,
    URL Mods > Language set from directory name in pretty permalinks: true,
    URL Mods > Language set from subdomain: false,
    URL Mods > Language set from diff domains: false,
    URL Mods > Hide URL lang info for default: true,
    URL Mods > Remove /language/ in permalinks: true,
    URL Mods > Keep /language/ in permalinks: false,
    URL Mods > Front page url contains lang code instead of page name/id: true

    4) Set static front/news pages on default language only
    5) Deleted all my cookies since the plugin was implemented

    Thanks.

    It seemed to work very briefly, i.e. if I went to the homepage from an internal page it worked, but now I am in French again!

    I can live with it as long as new users aren’t stuck on the non-English homepage. Could you maybe check what result you get, please?

    http://www.tyzack.com/

    Nice site, I can’t seem to find an issue however (can always access any lang version of any page)…

    Thanks – that’ll do it for me!

    trefsgaard

    (@trefsgaard)

    How did you set the homepage….the default page without any language or anything…..o only get some /en/home and allsorts of endings and i cant find my static frontpage.

    Cheers
    Thomas

    oksizamnojzombie

    (@oksizamnojzombie)

    Good afternoon.
    I have a similar problem. It happens at a certain moment, I can not switch from Chinese to English only on the main page. It helps complete cleaning of cookies and stories, but this is not a solution for users on the site. The problem appears periodically. I can not understand the reason.
    Settings are set as in the message above. Monitoring of language settings in the browser is turned off. The default browser language is English. When I click the Chinese, and then English, the English version of the site does not return.
    What could be the reason?

    This might help people; I solved this at least partially by unhiding my base URL.

    https://wordpress.org/support/topic/problem-with-switching-language-in-polylang/

    And here: https://polylang.pro/doc/url-modifications/

    • This reply was modified 1 year, 8 months ago by morino.

    As for the reason, I think after testing everything pretty much that some browsers (e.g. Firefox) conflict with Polylang. No issues on Chrome and others. Just a custom made app for my site and Firefox.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Cannot Return to Default Language Homepage’ is closed to new replies.