Context aware messages directory for next-intl. #3020
-
Hey folks, first off, solid VS Code extension! It was super easy to setup, and configure. However, I ran into one thing I wasn't a huge fan of. The next-intl plugin expects a single What works now:
What we'd like to be able to do:
Then we'd configure the plugin with the following in "plugin.inlang.nextIntl": {
"pathPattern": "./apps/.*/messages/{languageTag}.json"
}
// Or, maybe this?
"plugin.inlang.nextIntl": {
"pathPattern": [
{ "path": "./apps/api", "pathPattern": "./apps/api/messages/{languageTag}.json" },
{ "path": "./apps/web", "pathPattern": "./apps/web/messages/{languageTag}.json" },
]
} Is this something you've considered already? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I recommend creating different inlang projects for your packages.
.
├── apps/
├── ├── api
+├── │ ├── api.inlang
├── │ ├── messages
├── │ │ ├── en.json
├── │ │ └── es.json
├── │ └── src
└── └── web/
+ ├── ├── web.inlang
└── ├── messages/
├── │ ├── es.json
├── │ └── en.json
└── └── src (Coulnd't get the formatting to work with your tree snippet) @ellisio inlang (including sherlock) works out of the box with multiple inlang projects. hence, question answered? |
Beta Was this translation helpful? Give feedback.
-
@samuelstroschein Fantastic! I just tested this out and it worked perfectly. Thank you! |
Beta Was this translation helpful? Give feedback.
I recommend creating different inlang projects for your packages.
(Coulnd't get the formatting to work with your tree snippet)
@ellisio inlang (including sherlock) works out of the box with multiple inlang projects. hence, question answered?