Next.js Discord

Discord Forum

next-intl + route handler

Answered
Mini Satin posted this in #help-forum
Open in Discord
Avatar
Mini SatinOP
Anyone did this duo? I am getting this error:

Unable to find 'next-intl' locale because the middleware didn't run on this request.
Answered by Mini Satin
Thanks ! But the error was that I can’t pass undefined to the server side translations, it gives this error without explanation. You need to pass the default by yourself.
View full answer

3 Replies

Avatar
// next.config.js
const withNextIntl = require('next-intl');

module.exports = withNextIntl({
  // Your next-intl configuration options
});
I would like to propose a solution for the challenge you're facing
Avatar
Mini SatinOP
Thanks ! But the error was that I can’t pass undefined to the server side translations, it gives this error without explanation. You need to pass the default by yourself.
Answer