-
-
Notifications
You must be signed in to change notification settings - Fork 294
Adding individual json file for each page #1894
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
Comments
+1 (individual json file for each page like {
"locales": ["en", "fr"],
"defaultLocale": "en",
"pages": {
"*": ["common"],
"/": ["home"],
"/about": ["about", "footer"],
"/pricing": ["pricing", "footer"],
"/blog": ["blog"],
"/blog/[slug]": ["blog"],
"/blog/tags/[tag]": ["blog"],
}
}
|
You can currently do that with a bit of hardcode and manually exporting the json values:
|
But i agree the library should be able to handle separated translations natively in a better way, also without having to manually add each single file to some kind of list. For example, i like intlayer's approach, which moves dictionaries to a Also check out: |
@CarrettaRiccardo, Thanks. yes, I fully agree you. at the end of the day we can only merge the files but it is important to get local messages only by page not by locale as now. |
This is intended to be solved as part of #1. I'm looking to find time to start working on that in the coming months! |
Thanks, @amannn , see you with new updates. |
Ok, let me close this as a duplicate of #1 then! |
Greetings, @amannn
Is there any solution for now to add namespaces for each page in a separated file. right now, in any page we are navigating, we are request a
locale.json
file. This file include all written messages withing app(all pages).It was good if there was an option to place each page messages individually and get only related messages for active page on client side.
Big concern
: The number of lines writing messages extremely extended and the chunk size for this json file also increased to send for the client browser.reference:
request.ts
Describe the solution you'd like
There should be a chance to add:
Summary:
when user is using About page, we can we send only about.json messages ?
Describe alternatives you've considered
.
The text was updated successfully, but these errors were encountered: