currentLang = navigator.language;
if(!currentLang){
currentLang = navigator.browserLanguage;
}
if(currentLang.indexOf("zh") != -1){
window.location.href="http://www.XXX.com/";
}
currentLang = navigator.language;
if(!currentLang){
currentLang = navigator.browserLanguage;
}
if(currentLang.indexOf("zh") != -1){
window.location.href="http://www.XXX.com/";
}
转载于:https://my.oschina.net/liufeng815/blog/354338