minetest_modding_book/index.html

37 lines
770 B
HTML
Raw Normal View History

2017-08-26 18:40:30 +03:00
---
layout: none
---
<html>
<head>
<title>Redirecting...</title>
</head>
<body>
<script>
var languages = {{ site.data.languages | jsonify }};
function getLanguage() {
var userLang = navigator.language || navigator.userLanguage;
for (var i = 0; i < languages.length; i++) {
var lang = languages[i];
console.log(lang.code + " vs " + userLang);
if (userLang.indexOf(lang.code) == 0) {
return lang;
}
}
return null;
}
var language = getLanguage() || languages[0];
console.log('<a href="/' + language.code +
'/index.html">Redirecting to the ' + language.name +
' version...</a>')
document.write('<a href="/' + language.code +
'/index.html">Redirecting to the ' + language.name +
' version...</a>');
</script>
</body>
</html>