reactjsnext.jsinternationalization

Error when add I18n in nextJS Page Router


I got an error when I added i18n to Nextjs 14 and used page router. Here is my config:

locales: ['en-US', 'es-ES'],

defaultLocale: 'en-US',

When I visit the homepage, it turns to a 404 page, but when I access the following link, it returns to normal: domain.com/en-US/about-us

What error am I getting, can someone help me


Solution

  • Could you please try to copy and place index.tsx file under [locale] and check once.