JSON distribution of CLDR locale data for internationalization
It should be noted that XML (not JSON) is the "official" format for all CLDR data. The JSON data contained in the packages described below is provided as a convenience for the development community, and is programatically generated from the corresponding XML, using the JSON conversion utility that is provided as part of the CLDR tooling (written in Java).
The data in these packages is intended to serve as a common reference point for most
JavaScript packages. As such, this JSON data is generated using only data that has achieved
draft="contributed"
or draft="approved"
status in the CLDR. This is the same threshhold
as is used by the ICU (International Components for Unicode).
If you require JSON data containing provisional or unconfirmed data, or data that is customized
in any way, you can generate it using the Ldml2JSON conversion utility in CLDR's tools
distribution (org.unicode.cldr.json
).
Previously, each repository was tagged with the release it pertains to, for example 38.0.0
.
Now, only the cldr-json
repo will be used, and it will contain all data in a single tag.
- Check out the
cldr-staging
repo as a sibling to this one. This will be the data source. - Check out the
cldr
repo as a sibling to this one and set it up so maven builds are possible. - Run the script
cldr-generate-json.sh
- Data will be updated in the
cldr-json
subdirectory. - Run the script
cldr-generate-zips.sh
- npm packages can be updated as well. Each sub-subdirectory is an npm package.
See cldr-config.sh
for customization options.
See Updating JSON Data for detailed instructions.
This project is distributed by the Unicode Consortium Terms of Use
This project requires the following other projects to run:
- none
Because the CLDR is so large and contains so many different types of information, the JSON data here is grouped into packages by functionality. For each type of functionality, there are two available packages: The "modern" packages, which contain the set of locales listed as modern coverage targets by the CLDR subcomittee, and the "full" packages, which contain the complete set of locales, including those in the corresponding modern packages. The functional groups are:
- cldr-core – Basic CLDR supplemental data — only one package here, no "full" and "modern".
- cldr-dates – Data for date/time formatting, including data for Gregorian calendar. Requires that the corresponding cldr-numbers package be installed as well.
- cldr-cal-type – CLDR data for non-Gregorian calendars. type is one of the supported non-Gregorian calendar types in CLDR: buddhist, chinese, coptic, dangi, ethiopic, hebrew, indian, islamic, japanese, persian, or roc.
- cldr-localenames – Translated versions of locale display name elements: languages, scripts, territories, and variants.
- cldr-misc – Other CLDR data not defined elsewhere.
- cldr-numbers – Data for number formatting.
- cldr-rbnf – Rule Based Number Formatting data — only one package here, no "full" and "modern".
- cldr-segments – Line breaking data from Unicode's ULI project
- cldr-units – Data for units formatting.
Installation using npm:
$ npm install <package-name> , where <package-name> is one of the package names mentioned above, for example:
$ npm install cldr-dates-full
(Note that bower is deprecated, please use npm.)
See USERS.md for a list of libraries which use this data.
CLDR does not use Github's issue tracking system to track bugs. If you find an error in the data contained here, please file a new ticket at Unicode Jira