minetest_modding_book/index.html

36 lines
797 B
HTML
Raw Normal View History

2017-08-26 18:40:30 +03:00
---
layout: none
---
<html>
<head>
<title>Redirecting...</title>
</head>
<body>
Detecting and redirecting to the correct translation.<br><br>
<a href="en/index.html">View English Translation</a><br><br>
2017-08-26 18:40:30 +03:00
<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];
if (userLang.indexOf(lang.code) == 0) {
return lang;
}
}
return null;
}
var language = getLanguage() || languages[0];
2017-08-26 18:45:18 +03:00
var url = language.code + "/index.html";
document.write('<a href="' + language.code +
2017-08-26 18:40:30 +03:00
'/index.html">Redirecting to the ' + language.name +
' version...</a>');
2017-08-26 18:45:18 +03:00
window.location.replace(url);
2017-08-26 18:40:30 +03:00
</script>
</body>
</html>