-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
51 lines (46 loc) · 1.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0" />
<title>Redirecting...</title>
</head>
<body>
<script type="text/javascript">
//<![CDATA[
var lang = navigator.language;
var match = 0;
var locales = ["en-US","es-ES","zh-CN","zh-HK","zh-TW","it-IT"];
// Try for full match of lang_LOC
for(locale in locales)
{
if(lang == locales[locale])
{
match = 1;
break;
}
}
// Else try for match of lang
if(match == 0)
{
for(locale in locales)
{
var loc_lang = locales[locale].substring(0,2);
var language = lang.substring(0,2);
if(loc_lang == language)
{
lang = locales[locale];
match = 1;
break;
}
}
}
// Else default to en-US
if(match == 0)
{
lang = 'en-US';
}
window.location = lang + "/index.html";
//]]>
</script>
</body>
</html>