fix translation

This commit is contained in:
DioCrafts
2025-03-28 09:03:04 +01:00
parent fb276d9b24
commit cfae57061b
5 changed files with 186 additions and 59 deletions
+10 -2
View File
@@ -26,9 +26,17 @@ function checkAuthentication() {
}
}
document.addEventListener('DOMContentLoaded', () => {
document.addEventListener('DOMContentLoaded', async () => {
// Initialize i18n
initializeI18n();
await initializeI18n();
// Wait a moment for translations to fully load
setTimeout(() => {
// Manually translate all elements with data-i18n attribute
if (window.i18n && window.i18n.translatePage) {
window.i18n.translatePage();
}
}, 500);
// Elements
const sharedItemsList = document.getElementById('shared-items-list');