github sw-carlos-cristobal/sharetab v0.6.0
v0.6.0 — i18n Multilanguage Support

latest releases: build/2026.06.14.1, build/2026.06.10.1, build/2026.05.29.3...
one month ago

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_LOCALE cookie with Secure flag on HTTPS

Infrastructure:

  • src/lib/locale-paths.ts — shared locale path utilities
  • messages/{en,es}/ — namespaced JSON translation files (common, auth, dashboard, groups, expenses, settings, admin)
  • src/i18n/ — routing config, navigation helpers, request config
  • Suspense boundaries for useSearchParams static 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 stripLocalePrefix for callback URLs
  • Fixed locale cookie vs JWT priority race condition in middleware

Follow-up

  • #78 — Propagate locale to all formatCents call sites for locale-aware money formatting

Full Changelog: v0.5.12...v0.6.0

Don't miss a new sharetab release

NewReleases is sending notifications on new releases.