Fixed language persistence issues where sidebar and hero section did not
update when switching languages via navbar flags.
**Root Cause:**
- languageChanged event only updated document content
- URL lang parameter updated AFTER sidebar reload
- detectLanguage() read old lang from URL causing wrong language load
**Changes:**
1. Update URL lang parameter BEFORE reloading sidebar
2. Call updatePageUI() to update hero section instantly
3. Call loadDocuments() to reload sidebar with new language
4. Explicitly reload current document to ensure correct language
**Updated Elements on Language Change:**
- Hero section (page title, subtitle, search button)
- Sidebar category labels (Getting Started → Erste Schritte, etc.)
- Sidebar document titles (shows translations if available)
- Document content (reloads in correct language)
- GitHub section links
**Result:**
✅ Click language flag → entire page switches to new language instantly
✅ Document content loads in correct language (not previous language)
✅ No page refresh required
✅ All UI elements synchronized
✅ Ready for Caixin Global launch (Oct 29)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>