171
rated 0 times
[
173]
[
2]
/ answers: 1 / hits: 18416
/ 10 Years ago, tue, july 1, 2014, 12:00:00
I'm trying to send visitors that have browser language in English to an alternative site.
I was able to find this code but it's not working:
<script type=type/javascript>
var language = navigator.browserLanguage;
// alert(language);
if (language.indexOf('en') > -1) {
document.location.href = 'http://en.socialpos.com.ar';
} else {
document.location.href = 'http://socialpos.com.ar';
}
</script>
I'm not even getting the alert :/
You can see it in http://socialpos.com.ar
More From » browser