Spaces:
Runtime error
Runtime error
Upload index.html
Browse files- templates/index.html +6 -3
templates/index.html
CHANGED
|
@@ -607,8 +607,8 @@
|
|
| 607 |
<header class="text-center mb-5" style="position:relative">
|
| 608 |
<div style="position:absolute;right:0;top:0;">
|
| 609 |
<div class="lang-toggle">
|
| 610 |
-
<button class="lang-btn
|
| 611 |
-
<button class="lang-btn" id="btnID" onclick="setLang('id')">ID</button>
|
| 612 |
</div>
|
| 613 |
</div>
|
| 614 |
<h1 class="fw-bold mb-2"><i class="fas fa-microchip me-2 text-primary"></i><span data-i18n="title">Undertone
|
|
@@ -826,7 +826,7 @@
|
|
| 826 |
}
|
| 827 |
};
|
| 828 |
|
| 829 |
-
let currentLang = '
|
| 830 |
|
| 831 |
function setLang(lang) {
|
| 832 |
currentLang = lang;
|
|
@@ -1052,6 +1052,9 @@
|
|
| 1052 |
else { alert(data.error); toggleLoading(false); document.getElementById('placeholder').classList.remove('d-none'); }
|
| 1053 |
} catch { alert(TRANSLATIONS[currentLang].alertServer); toggleLoading(false); }
|
| 1054 |
}
|
|
|
|
|
|
|
|
|
|
| 1055 |
</script>
|
| 1056 |
</body>
|
| 1057 |
|
|
|
|
| 607 |
<header class="text-center mb-5" style="position:relative">
|
| 608 |
<div style="position:absolute;right:0;top:0;">
|
| 609 |
<div class="lang-toggle">
|
| 610 |
+
<button class="lang-btn" id="btnEN" onclick="setLang('en')">EN</button>
|
| 611 |
+
<button class="lang-btn active" id="btnID" onclick="setLang('id')">ID</button>
|
| 612 |
</div>
|
| 613 |
</div>
|
| 614 |
<h1 class="fw-bold mb-2"><i class="fas fa-microchip me-2 text-primary"></i><span data-i18n="title">Undertone
|
|
|
|
| 826 |
}
|
| 827 |
};
|
| 828 |
|
| 829 |
+
let currentLang = 'id';
|
| 830 |
|
| 831 |
function setLang(lang) {
|
| 832 |
currentLang = lang;
|
|
|
|
| 1052 |
else { alert(data.error); toggleLoading(false); document.getElementById('placeholder').classList.remove('d-none'); }
|
| 1053 |
} catch { alert(TRANSLATIONS[currentLang].alertServer); toggleLoading(false); }
|
| 1054 |
}
|
| 1055 |
+
|
| 1056 |
+
// Set default language on load
|
| 1057 |
+
document.addEventListener('DOMContentLoaded', () => setLang('id'));
|
| 1058 |
</script>
|
| 1059 |
</body>
|
| 1060 |
|