• Hi dear support,

    I use polylang plugin to display my website in two languages. For contact form, i use contact form 7. I think Autodetect language don’t work with polylang plugin.

    Can you help me ?
    Thanks a lot

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Auto detect works with browser language not website language. If any visitor’s browser is set to another language then they will see that language captcha.

    If you want to show captcha in website language then you can use anr_get_option filter hook to set language on run time.

    Thread Starter hellobastpepite

    (@hellobastpepite)

    Hi Shamim,

    Thanks for your answer,
    How can i use anr_get_option filter hook to set language on run time ? I’m on Google Chrome.

    Thanks

    You can add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'anr_get_option', function( $value, $option ){
        if( 'language' == $option && function_exists( 'pll_current_language' ) ){
            $value = pll_current_language();
        }
        return $value;
    }, 10, 2);
    

    Let me know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Polylang Compatibility’ is closed to new replies.