- Unified localStorage key to 'theme-preference' across all components
- Fixed header.tsx using wrong localStorage key ('theme' instead of 'theme-preference')
- Added localStorage hybrid persistence for instant theme changes
- Removed router.refresh() which was causing stale data revert
- Replaced Blue theme with Sepia
- Consolidated auth() calls to prevent race conditions
- Updated UserSettingsData types to include all themes
Fixes issue where interface always defaulted to English for new users.
Now automatically detects and applies browser language on first visit.
Changes:
- lib/i18n/LanguageProvider.tsx:
- Add browser language detection using navigator.language
- Check if detected language is in supported languages list
- Auto-save detected language to localStorage
- Update HTML lang attribute for proper font rendering
Behavior:
- First visit: Detects browser language (e.g., fr-FR → fr)
- Returning visits: Uses saved language from localStorage
- Fallback: Defaults to English if language not supported
Result:
✓ French users see French interface automatically
✓ All supported languages work (en, fr, es, de, fa, it, pt, ru, zh, ja, ko, ar, hi, nl, pl)
✓ Better UX for international users
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>