Skip to content

Commit 34b1f4e

Browse files
committed
docs: update CLDR data docs
1 parent f0fd876 commit 34b1f4e

File tree

2 files changed

+31
-28
lines changed

2 files changed

+31
-28
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ It includes methods for parsing and formatting dates and numbers by using [Unico
2020

2121
### CLDR Data
2222

23-
To download the full CDLR database, you need to install the [cldr-data module](https://www.npmjs.com/package/cldr-data) by running the following command.
23+
To use the [Unicode® CLDR](https://cldr.unicode.org/) data, you need to install the following subset of [cldr-json](https://github.com/unicode-org/cldr-json) packages by running the following command:
2424

2525
```sh
26-
npm install --save cldr-data
26+
npm install --save cldr-core cldr-dates-full cldr-numbers-full
2727
```
2828

2929
To apply the methods for different locales, load the `likelySubtags` and the locale data by using the [`load`](https://github.com/telerik/kendo-intl/blob/master/docs/cldr/api.md#load) method.
@@ -36,15 +36,16 @@ Additionally, the library requires you to load:
3636
import { load } from '@progress/kendo-intl';
3737

3838
load(
39-
require("cldr-data/supplemental/likelySubtags.json"),
40-
require("cldr-data/supplemental/currencyData.json"),
41-
require("cldr-data/supplemental/weekData.json"),
42-
43-
require("cldr-data/main/bg/numbers.json"),
44-
require("cldr-data/main/bg/currencies.json"),
45-
require("cldr-data/main/bg/ca-gregorian.json"),
46-
require("cldr-data/main/bg/dateFields.json"),
47-
require("cldr-data/main/bg/timeZoneNames.json")
39+
require('cldr-core/supplemental/likelySubtags.json'),
40+
require('cldr-core/supplemental/currencyData.json'),
41+
require('cldr-core/supplemental/weekData.json'),
42+
43+
require('cldr-numbers-full/main/bg/numbers.json'),
44+
require('cldr-numbers-full/main/bg/currencies.json'),
45+
46+
require('cldr-dates-full/main/bg/dateFields.json'),
47+
require('cldr-dates-full/main/bg/ca-gregorian.json'),
48+
require('cldr-dates-full/main/bg/timeZoneNames.json')
4849
);
4950
```
5051

docs/cldr/index.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ In order for it to function properly, load the data for the corresponding locale
1414

1515
## Prerequisites
1616

17-
If you work with the `en` locale, you do not have to load any data. The only exception refers to the currency formatting with non-default currency. In this case, load the `cldr-data/main/en/currencies.json` data.
17+
If you work with the `en` locale, you do not have to load any data. The only exception refers to the currency formatting with non-default currency. In this case, load the `cldr-numbers-full/main/en/currencies.json` data.
1818

1919
The following table provides the data formats that are required for number and date formatting and parsing when you use a non-default locale.
2020

2121
| Formats | Required data |
2222
|:--- |:--- |
23-
| Any | `cldr/supplemental/likelySubtags.json` |
24-
| Basic numbers | `cldr/main/locale/numbers.json` |
25-
| Currency | `cldr/main/locale/currencies.json` and `cldr/supplemental/currencyData.json` |
26-
| Basic dates | `cldr/main/locale/ca-gregorian.json` |
27-
| Localized time-zone | `cldr/main/locale/timeZoneNames.json` |
28-
| Localized date field names | `cldr/main/locale/dateFields.json` |
29-
| Numeric week day formatting | `cldr/supplemental/weekData.json` |
23+
| Any | `cldr-core/supplemental/likelySubtags.json` |
24+
| Basic numbers | `cldr-numbers-full/main/LOCALE/numbers.json` |
25+
| Currency | `cldr-numbers-full/main/LOCALE/currencies.json` and `cldr-core/supplemental/currencyData.json` |
26+
| Basic dates | `cldr-dates-full/main/LOCALE/ca-gregorian.json` |
27+
| Localized time-zone | `cldr-dates-full/main/LOCALE/timeZoneNames.json` |
28+
| Localized date field names | `cldr-dates-full/main/LOCALE/dateFields.json` |
29+
| Numeric week day formatting | `cldr-core/supplemental/weekData.json` |
3030

3131
## Getting CLDR Data
3232

@@ -41,15 +41,16 @@ To load the CLDR data, use the [`load`](https://github.com/telerik/kendo-intl/bl
4141
```
4242
import { cldr, load } from '@progress/kendo-intl';
4343
44-
const likelySubtags = require("cldr-data/supplemental/likelySubtags.json");
45-
const weekData = require("cldr-data/supplemental/weekData.json");
46-
const currencyData = require("cldr-data/supplemental/currencyData.json");
44+
const likelySubtags = require('cldr-core/supplemental/likelySubtags.json');
45+
const weekData = require('cldr-core/supplemental/weekData.json');
46+
const currencyData = require('cldr-core/supplemental/currencyData.json');
4747
48-
const numbers = require("cldr-data/main/bg/numbers.json");
49-
const timeZoneNames = require("cldr-data/main/bg/timeZoneNames.json");
50-
const calendar = require("cldr-data/main/bg/ca-gregorian.json");
51-
const currencies = require("cldr-data/main/bg/currencies.json");
52-
const dateFields = require("cldr-data/main/bg/dateFields.json");
48+
const numbers = require('cldr-numbers-full/main/bg/numbers.json');
49+
const currencies = require('cldr-numbers-full/main/bg/currencies.json');
50+
51+
const calendar = require('cldr-dates-full/main/bg/ca-gregorian.json');
52+
const dateFields = require('cldr-dates-full/main/bg/dateFields.json');
53+
const timeZoneNames = require('cldr-dates-full/main/bg/timeZoneNames.json');
5354
5455
load(
5556
likelySubtags,
@@ -58,6 +59,7 @@ load(
5859
5960
numbers,
6061
currencies,
62+
6163
calendar,
6264
dateFields,
6365
timeZoneNames
@@ -68,7 +70,7 @@ load(
6870

6971
## Pre-Building CLDR Data
7072

71-
> To generate the locales, install the [`cldr-data`](https://www.npmjs.com/package/cldr-data) package first.
73+
> To generate the locales, install the following subset of [cldr-json](https://github.com/unicode-org/cldr-json) packages first: 'cldr-core cldr-dates-full cldr-numbers-full'.
7274
7375
The `build` method the kendo-intl package provides generates the files which use the data that is required by the Internationalization library.
7476

0 commit comments

Comments
 (0)