What's New
i18n Multilanguage Support (#77)
ShareTab now supports multiple languages with next-intl and subpath routing (/en/..., /es/...).
Features:
- English and Spanish translations across all pages (login, register, dashboard, groups, expenses, settings, admin, invite)
- Language switcher in sidebar and mobile header with instant switching
- User locale preference persisted to database and JWT
- Middleware-level locale detection: cookie → JWT → Accept-Language → default
- Locale-prefixed routing with automatic redirect for bare URLs
- Query params preserved through locale switching and login/register flows
NEXT_LOCALEcookie with Secure flag on HTTPS
Infrastructure:
src/lib/locale-paths.ts— shared locale path utilitiesmessages/{en,es}/— namespaced JSON translation files (common, auth, dashboard, groups, expenses, settings, admin)src/i18n/— routing config, navigation helpers, request config- Suspense boundaries for
useSearchParamsstatic generation compatibility z.enum(locales)validation on locale persistence
Adding a new language: Copy messages/en/ to messages/{code}/, translate, and add the locale to src/i18n/routing.ts.
Bug Fixes
- Fixed double-slash in
stripLocalePrefixfor callback URLs - Fixed locale cookie vs JWT priority race condition in middleware
Follow-up
- #78 — Propagate locale to all
formatCentscall sites for locale-aware money formatting
Full Changelog: v0.5.12...v0.6.0