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 for splitting messages into multiple files in a directory #483

Closed
iverks opened this issue Aug 28, 2023 · 2 comments
Closed

Support for splitting messages into multiple files in a directory #483

iverks opened this issue Aug 28, 2023 · 2 comments
Labels
enhancement New feature or request unconfirmed Needs triage.

Comments

@iverks
Copy link

iverks commented Aug 28, 2023

Is your feature request related to a problem? Please describe.

Having all translations per language in a single file gets crowded for large projects. It would be nice to split them into multiple files based on namespace

Describe the solution you'd like

Having my translation namespaces as files nested in the messages/en folder and the messages/no folder like so

├── messages 
│   ├── en
│   │       ├── common.json
│   │       ├── frontpage.json
│   │       └── ...
│   ├── no
│   │       ├── common.json
│   │       ├── frontpage.json
│   │       └── ...
│   └── ...
│   

Describe alternatives you've considered

Manually importing every file with some clever loop in my layout.tsx and putting it into my messages.json

@iverks iverks added enhancement New feature or request unconfirmed Needs triage. labels Aug 28, 2023
@amannn
Copy link
Owner

amannn commented Aug 29, 2023

This has been discussed in #357 before, I hope this answers your question!

@amannn amannn closed this as completed Aug 29, 2023
@amannn
Copy link
Owner

amannn commented Aug 29, 2023

On a related note, there's now a VSCode integration for next-intl which helps to streamline the management of translations in large files: VSCode integration docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants