An example that showcases how an app can provide a locale in i18n.ts
to next-intl
in an App Router setup.
This can be useful in the following cases:
- You'd like to provide a locale to
next-intl
, e.g. based on user settings - Your app only supports a single language
Note that:
- No
[locale]
segment needs to be added - No routing APIs need to be used (middleware and navigation APIs)
- Eligibility for static or dynamic rendering is decided by user
By deploying to Vercel, you can check out the example in action. Note that you'll be prompted to create a new GitHub repository as part of this, allowing you to make subsequent changes.