Feb 10 (edited) • General discussion
How I configured next-intl in a Next.js app
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].
3
0 comments
Karol Szykula
3
How I configured next-intl in a Next.js app
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 learning.
Build your own community
Bring people together around your passion and get paid.
Powered by