Support » Plugin: Google Website Translator » Turning the plugin OFF when reload or navigating out of page

  • Resolved oguido

    (@oguido)


    Hello, I notice that your plugin stays ON (ie. automatically translating the page) even if I reload the page or even close it and open a new one with my website on it. It continues to translate to the last language I clicked on. But that doesn’t work for me because then I have to add my main language as one of the select-language options, which I don’t want to.
    My question is, how can I disable (ie. make the plugin stop translating) without having to click on my main website’s language?
    Is there a cookie I can delete or somehow through PHP or JS?
    I need to do this in order to use your plugin, since I need it to reset it if there’s a reload or the user goes to any other page.
    Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Prisna

    (@prisna)

    Greetings,

    The selected language is stored in a cookie by the translator. As you may or may not know, the core of the plugin is made by Google. So we can’t really change the way it works, only Google can.

    The cookie name is googtrans. You can run the following PHP code to remove it:

    if (isset($_COOKIE['googtrans'])) {
        unset($_COOKIE['googtrans']);
        setcookie('googtrans', '', time() - 3600, '/');
    }

    Regards

    Thread Starter oguido

    (@oguido)

    That is very helpful! thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Turning the plugin OFF when reload or navigating out of page’ is closed to new replies.