💡 Update docs

This commit is contained in:
2025-07-12 23:56:04 +08:00
parent 737f83cd5f
commit 80c8ecb4cf
16 changed files with 230 additions and 69 deletions

View File

@@ -70,11 +70,9 @@ function initLanguageToggle() {
const langToggle = document.getElementById('lang-toggle');
if (!langToggle) return;
// Get initial language from local storage or browser preference
// Get initial language from local storage or default to English
const savedLang = localStorage.getItem('lang');
const userLang = navigator.language || navigator.userLanguage;
const defaultLang = userLang.includes('zh') ? 'zh' : 'en';
const lang = savedLang || defaultLang;
const lang = savedLang || 'en';
// Set current language and apply it
window.currentLang = lang;