mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## What? To avoid the default `favicon.ico` request by the browser, we are adding a vercel `favicon.ico` to the project. Currently, we handle exceptions for `favicon.ico` entering the Dynamic Route `[lang]` in the following manner, but in this case, favicon.ico renders the entire page. [example:app-dir-i18n-routing](https://github.com/vercel/next.js/blob/canary/examples/app-dir-i18n-routing/get-dictionary.ts#L12) ```ts export const getDictionary = async (locale: Locale) => dictionaries[locale]?.() ?? dictionaries.en(); ``` Instead of `favicon.ico`, the full HTML of the default language 'en' is rendered.  In the correct case  Fixes https://github.com/vercel/next.js/issues/46918 Co-authored-by: Sam Ko <[email protected]>
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).