I18n Implementation - NextJS v14 404 & Middleware Errors

Hi @damian.connolly, thank you for providing lots of details. :slight_smile:

Could you take a look at this thread and give the recommended solution a try?

Our i18n documentation and start is out dated as we did not decide on a final direction internally, but what is described in that thread can be used today.

Notably, you can make the following changes to your setup:

  • Remove the i18n property and the local-related lines from next.config.js. The i18n property is designed for the Pages Router, which your website does not seem to use.
  • Remove the createClient() and client.getRepository() lines from middleware.ts. Fetching a repository's locale in middleware will cause every page to be delayed by ~300 ms, which should be avoided if possible.

I hope that helps! We are aware that we need to update our i18n and clarify the setup.