- Install next-intl package - Create LanguageProvider hook with localStorage persistence - Create IntlProvider component for next-intl integration - Create Providers wrapper component - Update layout.tsx to include providers and set default lang to 'es' - Create initial translation files (common.json) for es, en, ca - Fix pre-existing TypeScript errors in various pages All tests passing, build successful.
8 lines
203 B
TypeScript
8 lines
203 B
TypeScript
"use client";
|
|
|
|
import { useTranslations as useNextIntlTranslations } from "next-intl";
|
|
|
|
export function useTranslation(namespace?: string) {
|
|
const t = useNextIntlTranslations(namespace);
|
|
return t;
|
|
}
|