I have a plugin that applies a Google translation to my page--how does the browser know which language to display?

My site uses a plugin (Google Language Translator) to apply a Google translation of the text (see page here--the flags at the top of the page switch the language). If I change to another language, close the browser, re-open the browser, and re-open my page, the same language is displayed. How does the browser know to display in the same language as before?

Is there some variable set somewhere? Perhaps a cookie, or session ID? Or perhaps some kind of JavaScript variable? I've looked through the source code, but can't see anything obvious.

I have tried contacting the plugin developer, but they have not responded :-/

The motivation for my question is because I have now used a separate plugin (WPML) to create a manual French translation of my site. But when a visitor switches between the Google translations and this manual French site, there are issues. For example, if a visitor switches to Chinese, then tries to access the French site, the page is displayed like so. On first glance, it appears that the browser continues to think a Chinese Google translation needs to be applied.

Topic multi-language plugins Wordpress

Category Web


The replies in this outside thread led me to discover that a cookie is indeed being set in the browser that instructs a Google translation to be applied. This is the information I was after.

edit: Specifically, the plugin displays the Google Language Bar on my site. When a visitor uses this language bar to switch the language of the page, a googtrans cookie is set on my page, corresponding to the indicated language (screenshot). As I understand, the cookie is added by an external script hosted by Google, not by the plugin. So I cannot delete the cookie, or cause it to expire.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.