Steps to Configure the next-intl Package in Next.js
Hello engineers
Here are the steps I followed to add and configure the next-intl package in my Next.js project:
  • Run npm install next-intl.
  • Add the next-intl plugin to next.config.ts.
  • Create proxy.ts and add the routing middleware.
  • Create i18n/routing.ts to define routing.
  • Create i18n/request.ts to define the getRequestConfig function.
  • Create i18n/navigation.ts to add next-intl wrappers for Next.js navigation components.
  • Move all routes to the app/[locale] path.
  • Add the generateMetadata function to app/[locale]/layout.tsx.
I also made some minor adjustments: I added a favicon and changed the typography component names to lowercase.
All changes can be checked here [link].
2
0 comments
Karol Szykula
2
Steps to Configure the next-intl Package in Next.js
powered by
EngineeringTech
skool.com/szykulatech-3240
We focus on JS/TS, React, Next.js, Supabase, shadcn/ui, Tailwind CSS, and deployments on Netlify. We focus on fast shipping.