-
Notifications
You must be signed in to change notification settings - Fork 28
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
Filter available languages #60
Comments
Yes, you can include each file explicitly like We should update README.md to reflect this info. Do you want to help? |
Thank you for your answer. No, I don't use globalize, because I only need translation for timezones.
Sorry, but where must I explicitly include Yes, I can help update README.md as soon as I understand how it works ;-) |
OK. You can't use - import cldrData from 'cldr-data';
+ import likelySubtags from 'cldr-data/supplemental/likelySubtags';
+ import enTimeZoneNames from 'cldr-data/main/en/timeZoneNames`;
+ // and so on for other locales...
...
- Cldr.load(cldrData('supplemental/likelySubtags'));
- Cldr.load(cldrData(`main/${lang}/timeZoneNames`));
+ Cldr.load(likelySubtags);
+ Cldr.load(enTimeZoneNames);
+ // and so on for other locales... |
Works great, you're a hero ! |
Excellent, let's try to help to clarify this to people having same issues in our README. :) Thanks |
Hi Rxaviers, We are having a related issue to the original request, but it is at install time rather than run or compile time:
We get intermittent failures in our build pipeline trying to fetch the 80 or so mb of CLDR data. We filter in our package.json:
and pull in:
Each of these still contain the full country sets when we only need two. We also find in the install stack trace that it doesn't tell us exactly which calls failed:
|
@mummybot this could be useful to you rxaviers/cldr-data-downloader#25 |
Thanks! A random question, why did you point to the github archive (it is this connectivity which is causing us issues) with the downloader rather than npm? https://github.com/unicode-cldr/cldr-json#installation Installation using NPM:
|
Hi,
I'm using cldr-js and cldr-data-npm.
It feet's exactly what I need, but currently my app only needs 3 languages (en, fr and ja).
Is it possible while packaging my app (I'm using webpack) to filter the included languages ?
Or while using cldr-data-npm, to only install needed languages ?
The text was updated successfully, but these errors were encountered: