-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
46 lines (45 loc) · 1.56 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
<!DOCTYPE html>
<html>
<head>
<title>Siv3D</title>
<script type="text/javascript">
function redirectToLanguage() {
// ブラウザの言語設定を取得
var userLang = navigator.language || navigator.userLanguage;
userLang = userLang.toLowerCase();
// 日本語なら日本語ページへ、それ以外は英語ページへリダイレクト
if (userLang.includes("ja")) {
window.location.href = "https://siv3d.github.io/ja-jp/";
} else {
window.location.href = "https://siv3d.github.io/en-us/";
}
}
//ページが読み込まれたときに実行される関数
window.onload = function() {
//要素を非表示にする
document.getElementById("redirect_message").style.display = "none";
//言語に基づくリダイレクトを行う
redirectToLanguage();
}
</script>
</head>
<body>
<div id="redirect_message">
<p>If you are not redirected, please use the following links:</p>
<ul>
<li><a href="./ja-jp/">Japanese</a></li>
<li><a href="./en-us/">English</a></li>
</ul>
</div>
<noscript>
<!-- JavaScriptが無効な場合のみ表示 -->
<div>
<p>It seems JavaScript is disabled in your browser. Please use the following links:</p>
<ul>
<li><a href="https://siv3d.github.io/ja-jp/">Japanese</a></li>
<li><a href="https://siv3d.github.io/en-us/">English</a></li>
</ul>
</div>
</noscript>
</body>
</html>