mirror of
https://github.com/root-fr/jmap-webmail.git
synced 2026-09-24 16:01:18 +00:00
Refactored i18n implementation to support seamless language switching without page reload by pre-loading all translations and using locale-aware navigation helpers. Changes: - Created centralized routing config (i18n/routing.ts) with localePrefix: 'never' - Added type-safe navigation helpers (i18n/navigation.ts) - Implemented custom IntlProvider with pre-loaded EN/FR translations - Updated all pages to use new useRouter from i18n/navigation - Added language switcher to appearance settings - Removed URL-based locale routing (no more /en/ or /fr/ prefixes) - Language preference persisted via Zustand localStorage Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
9 lines
272 B
TypeScript
9 lines
272 B
TypeScript
import createIntlMiddleware from 'next-intl/middleware';
|
|
import { routing } from './i18n/routing';
|
|
|
|
export default createIntlMiddleware(routing);
|
|
|
|
export const config = {
|
|
// Skip all paths that should not be internationalized
|
|
matcher: ['/((?!api|_next|.*\\..*).*)']
|
|
}; |