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

Multiple files per language #9

Closed
micobarac opened this issue Nov 14, 2018 · 3 comments
Closed

Multiple files per language #9

micobarac opened this issue Nov 14, 2018 · 3 comments

Comments

@micobarac
Copy link

Is it possible to split a single language translation file into multiple .json files (per module or component)?

Single language file can get really huge for big apps and difficult to maintain.

Setting .json file to be loaded dynamically in routes would be an extra feature.

@DenysVuika
Copy link
Contributor

Not for the moment. I'm still investigating what is the easiest way to support file splitting and lazy loading. Mind that trying to split on per-component basis is opening a can of worms. At some point you may need to wait for numerous files downloaded just to show text correctly. Same for switching languages - there will be a performance/bandwidth penalty in this case.

@micobarac
Copy link
Author

micobarac commented Nov 15, 2018

Well it would be practical to, at least, assign a separate .json translation file to each module in a large application, wouldn't you agree? Currently I am working on app with more than 30 modules, with lazy loading in place.

Keeping translation tokens in a single file per language would be a real nightmare. Setting some kind of resolve in routing data could possibly be a place of initiating a load of a new .json file (per currently active module).

I agree that keeping a single file per language is optimal with no loading overhead.

Btw, congrats on this cool library :).

@DenysVuika
Copy link
Contributor

@micobarac yes, I fully agree that it lacks the per-module splitting and elaborating on that. thanks for the feeback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants