• Resolved eschoenawa

    (@eschoenawa)


    When I activate this plugin the automatic detection of the browser language integrated into Polylang breaks. The page always opens with the default language instead. In order to test this make sure to clear your cookies or your language preference from a previous visit is used. Took me some time to realize that the automatic language selection broke.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter eschoenawa

    (@eschoenawa)

    Okay, after some digging I found this in the plugin’s class-apsfc.php:

    
    /**
    * Disable detect browser language, will return default language instead.
    */
    add_filter( 'pll_preferred_language', '__return_false' );
    

    I tried removing it and it had no negative effect as far as I can tell (I might be wrong though). And removing it re-enables the auto-detection.

    This also impact the selected user language.

    If the user select a different language than the default, when they came back to the website, the user is redirected to the default language not the last he selected.

    Thread Starter eschoenawa

    (@eschoenawa)

    @atsn Do you mean when installing this plugin or after applying my fix? As far as I can tell the behavior you’re describing doesn’t happen on my page after applying the fix.

    Plugin Author richardevcom

    (@richardevcom)

    Thank you for submission and sorry for late response (this is open-source/free to use plugin and I try to polish it in my free time).

    @eschoenawa & @atsn please update the plugin, as I have included the fix in newest version. ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Activating the plugin breaks polylangs detection of the browser language’ is closed to new replies.