在首页的head之间加入如下代码即可:
<script type="text/javascript">  
 
var type=navigator.appName;  
if (type=="Netscape") var lang = navigator.language;  
else var lang = navigator.userLanguage;  
 
//cut down to first 2 chars of country code  
var lang = lang.substr(0,2);  
 //英语  
if(lang == "en") window.location.replace('http://www.n-pass.cn/en');  
 //中文(不管简体繁体)  
else if (lang == "zh") window.location.replace('http://www.n-pass.cn/cn');  
//德语  
else if (lang == "de") window.location.replace('http://www.n-pass.cn/en');  
 //除上面所列的语言  
else window.location.replace('http://www.n-pass.cn/en');  
</script>