55b29fb351
There are some incoming docs / MDX changes where prettier will throw an error when using the older version. Updating prettier before I bring in those changes. Looks like the most notable change is adding parentheses around `typeof` checks in TypeScript. **Before** ``` export type Locale = typeof i18n['locales'][number] ``` **After** ``` export type Locale = (typeof i18n)['locales'][number] ``` |
||
---|---|---|
.. | ||
.vscode | ||
app/[lang] | ||
dictionaries | ||
.gitignore | ||
get-dictionary.ts | ||
i18n-config.ts | ||
middleware.ts | ||
next-env.d.ts | ||
next.config.js | ||
package.json | ||
README.md | ||
tsconfig.json |
Internationalized Routing
Next.js doesn't support internationalized routing in app
directory out of the box. But you can easily implement it yourself. This example shows how to implement internationalized routing on the Edge.
Deploy your own
Deploy the example using Vercel or preview live with StackBlitz
How to use
Execute create-next-app
with npm, Yarn, or pnpm to bootstrap the example:
npx create-next-app --example app-dir-i18n-routing i18n-app
# or
yarn create next-app --example app-dir-i18n-routing i18n-app
# or
pnpm create next-app --example app-dir-i18n-routing i18n-app
Deploy it to the cloud with Vercel (Documentation).