Internationalization Guide (next-intl)
Core Principles
- No Hardcoded Strings: NEVER hardcode user-facing text or strings in the UI. All text must be rendered using
next-intl. - Default Locale: The project currently supports Thai (th) only. Treat
thas the default and fallback locale.
Implementation Strategy
Client Components
Use the
useTranslationhook for client-side translations.Pattern:
"use client"; import { useTranslation } from "next-intl"; export default function MyComponent() { const t = useTranslation("HomePage"); // Specify namespace return <button>{t("submitButton")}</button>; }
Source: iwindd/istore — distributed by TomeVault.