cldrjs
cldrjs copied to clipboard
How to get CLDR data? Needs more detailed information.
In my quest to resolve
E_MISSING_CLDR: Missing required CLDR content 'supplemental/likelySubtags'.
I've stumbled across various questions that ask the same thing. None of the answers seems exhaustive. Sorry to open yet another topic, but I think it's needed to have a basic tutorial.
I want two switch between formatting numbers in "en-US" and "nl-NL". So I need both languages configured.
I have found https://github.com/unicode-cldr/cldr-json.
- What do I download? Is cldr-core and cldr-numbers enough?
- Which version do I get? cldrjs NuGet package is version 0.4.8, but clrd-json has latest version 31.0.1. Does that work together?
- Where do I put it, in my project folder structure?
- Exactly what JavaScript do I write to bootstrap this in each language?
Did you decide it?
Got the same issue but I found this
Yes, the documentation is ambiguous and incomplete to say the least.
Cldr.js itself requires supplemental/likelySubtags
, everything else is optional. It actually depends on the library that uses cldr.js to implement i18n. For example, globalize.js (that uses cldr.js under the hoods) depends on the following for each of its functionalities https://github.com/globalizejs/globalize/#2-cldr-content
I am happy to accept PRs that clarifies the documentation here. Thank you
Thanks, @rxaviers. I realize now that my earlier comment read unnecessarily curt — my apologies.
I am keeping getting this:
globalize.min.js:1 Uncaught Error: E_MISSING_CLDR: Missing required CLDR content supplemental/likelySubtags
.
at u (globalize.min.js:1)
at f (globalize.min.js:1)
at e.n (globalize.min.js:1)
at e.t.emitEvent (event.min.js:1)
at e.trigger (event.min.js:1)
at S.e.get (event.min.js:1)
at p (globalize.min.js:1)
at Function.g.locale (globalize.min.js:1)
at utilities.js:847
Here is what I load:
<script src="https://cdnjs.cloudflare.com/ajax/libs/cldrjs/0.5.1/cldr.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cldrjs/0.5.1/cldr/event.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cldrjs/0.5.1/cldr/supplemental.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/globalize/1.5.0/globalize.min.js" type="text/javascript"></script>
Any idea what's going on?
Thanks