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 #1308

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Conversation

amannn
Copy link
Owner

@amannn amannn commented Aug 30, 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 30, 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:44am
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 0:44am
next-intl-example-app-router-without-i18n-routing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 0:44am

@amannn amannn changed the title feat: Support ./i18n/request.ts in addition to i18n.ts (#1303) feat: Support ./i18n/request.ts in addition to i18n.ts Aug 30, 2024
@amannn amannn marked this pull request as ready for review August 30, 2024 12:42
@amannn amannn changed the title feat: Support ./i18n/request.ts in addition to i18n.ts feat: Support ./i18n/request.ts in addition to ./i18n.ts Aug 30, 2024
@amannn amannn merged commit 258e95e into main Aug 30, 2024
8 checks passed
@volfcan volfcan mentioned this pull request Aug 31, 2024
3 tasks
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