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

Support i18n localeDetection with value false #585

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

alacroix
Copy link
Contributor

@alacroix alacroix commented Oct 22, 2024

Hey there,

We found that the locale detection is forced and doesn't support the option localeDetection to false as linked below:

https://nextjs.org/docs/pages/building-your-application/routing/internationalization#disabling-automatic-locale-detection

Since it's an opt-out option, I forced the exact check with false

Thanks!

Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: 92ec92b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Oct 22, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@585

commit: 92ec92b

@khuezy
Copy link
Contributor

khuezy commented Oct 22, 2024

Hey thanks! Would you be open to adding some unit tests around the i18 stuff? eg: https://github.com/opennextjs/opennextjs-aws/tree/main/packages/tests-unit/tests/core/routing

I want to add the i18 to our e2e apps too since support for it is still iffy, but that's for another day.

@alacroix
Copy link
Contributor Author

Done @khuezy 👍

I didn't test the accept-header file since it's copied from NextJS

// Copied from Next.js source code
// https://github.com/vercel/next.js/blob/canary/packages/next/src/server/accept-header.ts

Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks for that

@conico974 conico974 merged commit 8f4b67a into opennextjs:main Oct 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants