Default translation. Verification in the search console
-
Good afternoon @edo888. I’m using a subscription and need to change the default language for the main page. Everything works with your code from other topics (although I use php, but not the point)
<script type="text/javascript"> if(window.location.pathname=='/'){if(localStorage.getItem("ChangeLanguageFirstTime") === null) {doGTranslate('ru|uk');localStorage.setItem("ChangeLanguageFirstTime", true);}} </script>
but there is one problem. When checking through the search console – gives an error.
https://prnt.sc/plYJ31fyPd-C
If you remove this when checking the page code
<script>var gt_request_uri = '/';</script>
then no error occurs.Not strong in JS and I can not understand the reasons. Perhaps you can advise?
If you do not set a forced language change, then the code contains var gt_request_uri = ‘/’; but there is no error in the search console.
I really can’t figure out what’s going on here.
- The topic ‘Default translation. Verification in the search console’ is closed to new replies.