Skip to content

Conversation

@conico974
Copy link
Contributor

@conico974 conico974 commented Feb 28, 2025

With localeDetection:false we should still detect the locale for domain based thing.

TODO

  • Add some test
  • Add some explanation
  • Verify that it's the expected behaviour

@changeset-bot
Copy link

changeset-bot bot commented Feb 28, 2025

🦋 Changeset detected

Latest commit: d1d8532

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 28, 2025

Open in Stackblitz

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

commit: d1d8532

@nicholas-c
Copy link

Seems to be working as expected with the following next.config.ts i18n config;

  i18n: {
    locales: ["fr", "en", "es"],
    defaultLocale: "en",
    localeDetection: false,
    domains: [
      {
        domain: "next-15-en.nich-carter-qza3ng.gymshark-sandbox.tools",
        defaultLocale: "en",
        locales: ["fr"],
      },
      {
        domain: "next-15-es.nich-carter-qza3ng.gymshark-sandbox.tools",
        defaultLocale: "es",
      },
    ],
  },

https://next-15-en.nich-carter-qza3ng.gymshark-sandbox.tools/ <- Returns en
https://next-15-en.nich-carter-qza3ng.gymshark-sandbox.tools/fr <- Returns fr
https://next-15-es.nich-carter-qza3ng.gymshark-sandbox.tools/ <- Returns es

@conico974 conico974 marked this pull request as ready for review March 1, 2025 09:02
@conico974 conico974 merged commit 7b4ea5c into opennextjs:main Mar 1, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request Mar 1, 2025
@conico974 conico974 deleted the fix/i18n-locale-detect-false branch March 14, 2025 12:44
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