Answer the question
In order to leave comments, you need to log in
How to set the language version of the site in Google SERP?
I made an English version for the site.ru site and placed it in a separate subdomain en.site.ru
I don’t know how correct this is, but to determine which version of the site to show to the user, I wrote js:
If the language in the browser is set to something other than Russian, then switch the user to the English version
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru">
<html lang="ru">
часть кода вырезана ...
if (( userLang == "ru" ) || ( userLang == "ru-ru" ) || ( userLang == "ru-RU" )){
console.log(userLang);
}else
{
document.cookie = "s_lang=yes; max-age=31536000;"
location="<?=$engversiya?>";
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question