It is necessary that the language automatically changes based on the GET request. For example, example.com/?lang=en - and google translate translate into English.

Googled, I saw that cookies can be redone, but somehow I did not find a working example. Translator connects via JS. How can I make a check for PHP - if isset($_GET) , then the magic team that translates into English. lang Any ideas on how to do this better?

I want example.com?lang=en and example.com?lang=fr translate the site into English and French, respectively.

  • Duck and look at the connection settings of the translator in JS. Where there should be indicated the language into which it is necessary to translate. That's where you put it, what you have in $_GET['lang'] - teran

0