URL
https://jamulus.io
Describe the bug
|
<script> |
|
var ja = window.navigator.language || window.navigator.userLanguage; |
|
var mu = document.documentElement.lang; |
|
var lus = [{% for lng in site.languages %}"{{ lng }}",{% endfor %}]; |
|
var regex = RegExp('^' + mu); |
|
if (!regex.test(ja)) { // the language the browser has sent is not the language of the document |
|
// check if we support the language of the browser |
|
lus.forEach(function (lng, i) { |
|
if (ja.match('^' + lng)) { // this language is supported. We could add a suggestion here |
|
document.getElementById('langselect').classList.add('chlang','red'); |
|
document.getElementById('suglang').style.display = "block"; |
|
document.querySelectorAll('[data-slang='+ lng +']')[0].classList.add("proplang"); |
|
} |
|
}); |
|
} |
does not find suglang as the respective code has been removed (if we use the "new" language selector)
We should have a way to still mark suggested languages somehow.
@ignotus666
URL
https://jamulus.io
Describe the bug
jamuluswebsite/_includes/footer.html
Lines 27 to 41 in 2c40eec
We should have a way to still mark suggested languages somehow.
@ignotus666