Closed doktordirk closed 6 years ago
Thanks @doktordirk. I want to make clear that this is neither an issue with i18next and definitely not with the Aurelia I18N plugin. It all boils down to the fact that per definition the backend approach is made exactly for the case of lazy loading translation files. What you're proposing is to upfront load all necessary resources. This might be ok but could lead to tremendous upfront loading times. There are various webpack focused plugins for i18next, like the one mentioned by you or this one.
Nevertheless all of them lack a proper chunking approach, and I agree that the whole webpack story is a complete mess. I'd wish Webpack would provide nicer solutions for these cases, like a SystemJS fallback for lazy loading.
In the meantime I guess your approach at least helps most of the users to get started and have a beginning point for tackling more specific scenarios.
May I ask to add just a note about the potential down-sides (upfront loading, not lazy) to your doc updates, so that we save ourselves of tons of non-framework-related questions?
Right! Better?
Yep I think that sounds good and certainly doesnt drive wrong expectations. If you could just fix the typo i'll merge this. Thanks also for taking care of mine ;)
fixed: will increases-> will increase
thanks @doktordirk
For the love of god, i couldn't get any of the instructions to use aurelia-i18n with webpack and i18n-xhr-backend/aurelia-loader to work. Nothing from here or the web worked for we. In contrast, using i18next-resource-store-loader was very simple and worked. Hence i propose to add to the docs the apparently much simpler alternative of using
resources
and i18next-resource-store-loader instead ofbackend
and i18n-xhr-backend/aurelia-loader. Bundled translations are not a backend anyways.