Make locale redirector when Javascript is disabled
This commit is contained in:
parent
f495f678e5
commit
60b1302ee1
@ -6,6 +6,10 @@ layout: none
|
|||||||
<title>Redirecting...</title>
|
<title>Redirecting...</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Detecting and redirecting to the correct translation.<br><br>
|
||||||
|
|
||||||
|
<a href="en/index.html">View English Translation</a><br><br>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var languages = {{ site.data.languages | jsonify }};
|
var languages = {{ site.data.languages | jsonify }};
|
||||||
function getLanguage() {
|
function getLanguage() {
|
||||||
@ -21,8 +25,6 @@ layout: none
|
|||||||
|
|
||||||
var language = getLanguage() || languages[0];
|
var language = getLanguage() || languages[0];
|
||||||
var url = language.code + "/index.html";
|
var url = language.code + "/index.html";
|
||||||
console.log('<a href="' + url + '">Redirecting to the ' + language.name +
|
|
||||||
' version...</a>')
|
|
||||||
document.write('<a href="' + language.code +
|
document.write('<a href="' + language.code +
|
||||||
'/index.html">Redirecting to the ' + language.name +
|
'/index.html">Redirecting to the ' + language.name +
|
||||||
' version...</a>');
|
' version...</a>');
|
||||||
|
Loading…
Reference in New Issue
Block a user