what languages are you trying to hit @aykut ? List them and ill write some vanilla javascript to do it for you. That way you will only have to copy and paste my code
Finally i could bring it work. Redirection and language detection works but it permanently refreshes the site from new. So the only thing i can see is the pre loader which plays permanently.
This is the piece of code i used which you shared with me:
<script type= "text/javascript">
var language = window.navigator.language;
if(language == "en-US" || language == "en-AU" || language == "en-CA"){
window.location.href = "www.hasaluminyum.com";
}
else if(language == "de" || language == "de-AT" || language == "de-LI" || language == "de-CH" || language == "de-LU"){
window.location.href = "www.hasaluminyum.com";
}
else if(language == "tr"){
window.location.href = "/tr/anasayfa";
}
</script>
No. It don’t. Solely the browser redirects the site nearly every 0,2 sec. to the other URL . Ideally it should redirect just once. But it loads in a loop again and again. Couldn’t figure out the issue
Did you put this code on every version of the site? That would explain why it constantly reloads. Cause it checks the code each time and redirects. Ideally this code should only be ran once. You can achieve this by putting this code on a splash page that loads first, then directs them to the correct website that DOESN’T have this code.