This commit is contained in:
Viggo
2017-12-20 13:52:38 +08:00
parent 3d4132c40f
commit 0f785b32c6

View File

@@ -7,23 +7,16 @@
<script> <script>
if (navigator.appName == "Netscape") { if (navigator.appName == "Netscape") {
var language = navigator.language; var language = navigator.language;
} } else {
else{
var language = navigator.browserLanguage; var language = navigator.browserLanguage;
} }
if (language.indexOf(en) > -1) { if (language.indexOf("en") > -1) {
document.location.href = "en/index.html"; document.location.href = "en/index.html";
} } else if (language.indexOf("zh") > -1) {
else if (language.indexOf(zh) > -1){
document.location.href = "cn/index.html"; document.location.href = "cn/index.html";
} } else {
else{
document.location.href = "en/index.html"; document.location.href = "en/index.html";
} }