44d1a1cb15
This PR is part of a larger effort to migrate error messages to MDX and use App Router: https://github.com/vercel/front/pull/23459
46 lines
1.3 KiB
Text
46 lines
1.3 KiB
Text
---
|
|
title: Invalid i18n config
|
|
---
|
|
|
|
## Why This Error Occurred
|
|
|
|
In your `next.config.js` file, you provided an invalid config for the `i18n` field. This could mean the limit for 100 locale items was exceeded.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
Make sure your `i18n` field follows the allowed config shape, limits, and values:
|
|
|
|
```js filename="next.config.js"
|
|
module.exports = {
|
|
i18n: {
|
|
// These are all the locales you want to support in
|
|
// your application
|
|
locales: ['en-US', 'es', 'fr', 'nl-NL'],
|
|
// This is the default locale you want to be used when visiting
|
|
// a non-locale prefixed path e.g. `/hello`
|
|
defaultLocale: 'en-US',
|
|
// This is a list of locale domains and the default locale they
|
|
// should handle (these are only required when setting up domain routing)
|
|
domains: [
|
|
{
|
|
domain: 'example.com',
|
|
defaultLocale: 'en-US',
|
|
// other locales that should be handled on this domain
|
|
locales: ['es'],
|
|
},
|
|
{
|
|
domain: 'example.nl',
|
|
defaultLocale: 'nl-NL',
|
|
},
|
|
{
|
|
domain: 'example.fr',
|
|
defaultLocale: 'fr',
|
|
},
|
|
],
|
|
},
|
|
}
|
|
```
|
|
|
|
## Useful Links
|
|
|
|
- [Internationalized Routing Documentation](/docs/pages/building-your-application/routing/internationalization)
|