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

feat: Support ./i18n/request.ts in addition to i18n.ts #1303

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

amannn
Copy link
Owner

@amannn amannn commented Aug 29, 2024

There are typically at least two config files you're using when choosing the i18n routing setup:

  • ./src/i18n.ts
  • ./src/routing.ts

i18n.ts is currently named in a rather generic way, almost indicating that it contains everything related to i18n.

In order to clarify the meaning of these files and to gather them in a shared place, this PR proposes a new default location for the request config as well as the routing config:

└── src
    └── i18n
        ├── request.ts
        └── routing.ts

From my experience, many people already use an i18n folder or similar. This change might come in handy and avoids a potential configuration step for users.

That being said, i18n.ts is still supported, so there's no need to change existing apps.

Copy link

vercel bot commented Aug 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 0:29am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 0:29am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 0:29am

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.

1 participant