-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
jamuluswebsite/_includes/footer.html
Lines 27 to 41 in 2c40eec
| <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"); | |
| } | |
| }); | |
| } |
We should have a way to still mark suggested languages somehow.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Triage