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

Conditional support for subset of languages #56

Open
jirikrepl opened this issue Jul 18, 2020 · 0 comments
Open

Conditional support for subset of languages #56

jirikrepl opened this issue Jul 18, 2020 · 0 comments

Comments

@jirikrepl
Copy link

Hi,
let me explain my situation.

In my app, I use tap18n. I deploy my app to three different language domains. I only need one language sources e.g. *en.i18n.json at one time.

I have all my i18n files in project/gulp/i18n folder (which is added to .meteorignore). When I deploy my app I use gulp to copy e.g. all *.en.i18n.json to the /project/i18n - where tapi18n eagerly loads the language files

When doing this my app.js bundle only contains one set of language files. I am not sure if tap18n add all the language files to the client directly or use some AJAX to pull them. But in my tests If I copy all my language files to the /project/i18n folder, bundle size will increase.

Don't you guys have some ideas to implement similar behavior in this package?
To be able to conditionally add only one subset (language) of i18n files to the package.js

I tried this naive change: jirikrepl@de3aed6

But the change in package.js is not enough, it seems to be that tapi18n eagerly loads all the language files

This package has conditional language support: https://github.com/softwarerero/meteor-accounts-t9n
In their case, it seems to be that the change in package.js is enough because that package does not use tap18n https://github.com/softwarerero/meteor-accounts-t9n/blob/master/package.js

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

1 participant