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]: Example for app directory + cookie / header based locale switching #1315

Closed
softmarshmallow opened this issue Sep 3, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation Stale unconfirmed Needs triage.

Comments

@softmarshmallow
Copy link

Link to page

No response

Describe the problem

The App directory example only contains for router based localese, it would be nice to have a "best practice" example for doing a header (accept language) + cookie (NEXT_LOCALE) based, user preference based local switching.

@softmarshmallow softmarshmallow added documentation Improvements or additions to documentation unconfirmed Needs triage. labels Sep 3, 2024
@amannn
Copy link
Owner

amannn commented Sep 3, 2024

Are you referring to an example that doesn't use an i18n routing setup? The corresponding setup guide links to an example with a cookie setup at the bottom. Does that help?

If you want to additionally consider the accept-language header, you could set that up in a custom middleware.

Copy link

github-actions bot commented Oct 4, 2024

This issue has been automatically closed because there was no recent activity and it was marked as unconfirmed. Note that issues are regularly checked and if they remain in unconfirmed state, they might miss information required to be actionable or are potentially out-of-scope. If you'd like to discuss this topic further, feel free to open a discussion instead.

@github-actions github-actions bot added the Stale label Oct 4, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Stale unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants