feat: Support ./i18n/request.ts
in addition to i18n.ts
#1303
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.