                  textNode.textContent = langData[key];
                            } else if (el.childElementCount === 0) {
                                el.textContent = langData[key];
                            }
                        }
                    });
                    document.querySelectorAll('[data-i18n-title]').forEach(el => {
                        const key = el.getAttribute('data-i18n-title');
                        if (langData[key]) {
                            el.title = lang