Added language selector
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
|
||||
|
||||
function change_lang(base) {
|
||||
let cz = document.querySelector(base + "_cz");
|
||||
let en = document.querySelector(base + "_en");
|
||||
|
||||
if(cz.style.display == "none") {
|
||||
cz.style.display = "";
|
||||
en.style.display = "none";
|
||||
function switch_lang() {
|
||||
if(document.documentElement.lang == "en") {
|
||||
window.location.href = window.location.href.replace("/en", "/cz");
|
||||
} else {
|
||||
cz.style.display = "none";
|
||||
en.style.display = "";
|
||||
window.location.href = window.location.href.replace("/cz", "/en");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user