- Add multi-language support using next-intl - Configure routing and localization for English and Chinese - Update project structure to support i18n routing - Add middleware and navigation helpers for localized routing - Create message files for translations - Modify layout and page components to support internationalization
9 lines
299 B
TypeScript
9 lines
299 B
TypeScript
import { createNavigation } from 'next-intl/navigation';
|
|
import { routing } from '@/i18n/routing';
|
|
|
|
/**
|
|
* https://next-intl.dev/docs/getting-started/app-router/with-i18n-routing#i18n-navigation
|
|
*/
|
|
export const { Link, redirect, usePathname, useRouter, getPathname } =
|
|
createNavigation(routing);
|