Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add next-i18n-router as a resource for internationalized routing #52344

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

dcporter44
Copy link
Contributor

@dcporter44 dcporter44 commented Jul 6, 2023

Why?

Many developers are asking how to add internationalized routing in the App Router as it works in the Pages Router. next-i18n-router is a very helpful package that fully solves this challenge.

How?

Unlike the example provided in these Next.js i18n docs, next-i18n-router does not require nesting all pages in a [lang] dynamic segment. It also allows for the default language to be accessible without a locale prefix in the path (just like in the Pages Router).

It includes locale detection based on the accept-language header as recommended in the Next.js docs, as well as support for the NEXT_LOCALE cookie to set a user's preferred language (just like in the Pages Router).

Many developers are asking how to add internationalized routing with the App Router as it works with the Pages Router. The next-i18n-router library is a very helpful resource.

Unlike the example provided in these Next.js i18n docs, next-i18n-router does not require nesting all pages in a [lang] dynamic segment. It also allows for the default language to be accessible without a locale prefix in the path (just like in the Pages Router).

Also like the Pages Router, this library lets developers use the NEXT-LOCALE cookie to set a user's preferred language.
@dcporter44 dcporter44 requested review from a team as code owners July 6, 2023 17:32
leerob
leerob previously approved these changes Aug 24, 2023
@leerob leerob changed the title Add next-i18n-router as a resource for internationalized routing in the App Router docs docs: Add next-i18n-router as a resource for internationalized routing Aug 24, 2023
@kodiakhq kodiakhq bot merged commit be5f9ba into vercel:canary Aug 24, 2023
@github-actions github-actions bot added the locked label Sep 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants