You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-33Lines changed: 37 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,24 +7,30 @@
7
7
8
8
This repository contains the source code and documentation of the Kendo UI Internationalization package.
9
9
10
-
It includes methods for parsing and formatting dates and numbers using [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) data, which are split into the following modules:
10
+
It includes methods for parsing and formatting dates and numbers by using [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) data. These methods are split into the following modules:
11
11
12
-
* CLDR
13
-
* Date Parsing
14
-
* Date Formatting
15
-
* Number Parsing
16
-
* Number Formatting
12
+
*[CLDR](#cldr-data)
13
+
*[Date Parsing](#date-parsing)
14
+
*[Date Formatting](#date-formatting)
15
+
*[Number Parsing](#number-parsing)
16
+
*[Number Formatting](#number-formatting)
17
+
*[General Formatting](#general-formatting)
17
18
18
19
## Basic Usage
19
20
20
21
### CLDR Data
21
22
22
-
The [cldr-data module](https://www.npmjs.com/package/cldr-data) is required in order to download the full CDLR database.
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.
24
+
23
25
```sh
24
26
npm install --save cldr-data
25
27
```
26
28
27
-
To use the methods for different locales, use the [`load`](https://github.com/telerik/kendo-intl/blob/master/docs/cldr/api.md#load) method to load the `likelySubtags` and locale data. Additionally, the library requires the loading of the supplemental `currencyData` for the default currency formatting and the `weekData` for the day of week formatting.
29
+
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.
30
+
31
+
Additionally, the library requires you to load:
32
+
* The supplemental `currencyData` for the default currency formatting.
33
+
* The `weekData` for the day of week formatting.
28
34
29
35
```javascript
30
36
import { load } from'@telerik/kendo-intl';
@@ -42,7 +48,7 @@ For more examples and available configuration options, refer to the article on [
42
48
43
49
### Date Parsing
44
50
45
-
Date parsing converts a string to a `Date` object using the locale specific settings.
51
+
Date parsing converts a string to a `Date` object by using the specific settings of the locale.
46
52
47
53
```js
48
54
import { parseDate } from'@telerik/kendo-intl';
@@ -56,7 +62,7 @@ For more examples and available configuration options, refer to the article on [
56
62
57
63
### Date Formatting
58
64
59
-
Date parsing converts a `Date` object to a human-readable string using the locale specific settings.
65
+
Date formatting converts a `Date` object to a human-readable string by using the specific settings of the locale.
60
66
61
67
```js
62
68
import { formatDate } from'@telerik/kendo-intl';
@@ -70,7 +76,7 @@ For more examples and available configuration options, refer to the article on [
70
76
71
77
### Number Parsing
72
78
73
-
Number parsing converts a string to a `Number` object using the specific settings of the locale.
79
+
Number parsing converts a string to a `Number` object by using the specific settings of the locale.
74
80
75
81
```js
76
82
import { parseNumber } from'@telerik/kendo-intl';
@@ -85,7 +91,7 @@ For more examples and available configuration options, refer to the article on [
85
91
86
92
### Number Formatting
87
93
88
-
Number formatting converts a `Number` object to a human-readable string using the locale specific settings.
94
+
Number formatting converts a `Number` object to a human-readable string using the specific settings of the locale.
@@ -107,7 +113,7 @@ For more examples and available configuration options, refer to the article on [
107
113
108
114
### General Formatting
109
115
110
-
Provides methods for placeholder and type independent formatting using the locale specific settings.
116
+
General formatting provides methods for independent placeholder and type formatting by using the specific settings of the locale.
111
117
112
118
```js
113
119
import { format, toString } from'@telerik/kendo-intl';
@@ -123,27 +129,25 @@ For more examples and available configuration options, refer to the article on [
123
129
124
130
## Installation
125
131
126
-
The Internationalization library is published as a [scoped NPM package](https://docs.npmjs.com/misc/scope) in the [NPMJS Telerik account](https://www.npmjs.com/~telerik).
132
+
1.The Internationalization library is published as a [scoped NPM package](https://docs.npmjs.com/misc/scope) in the [NPMJS Telerik account](https://www.npmjs.com/~telerik).
Copy file name to clipboardExpand all lines: docs/cldr/index.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,34 +8,32 @@ position: 1
8
8
9
9
# CLDR Data
10
10
11
-
The Kendo UI Internationalization library uses the [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) as a source for the locale information. To function properly, it requires the data for the corresponding locale to load.
11
+
The Kendo UI Internationalization library uses the [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) as a source for the locale information.
12
12
13
-
The `numbers`, `currencies`, `gregorian calendar`(`"ca-gregorian"`) and `timeZoneNames` for the `en` locale are loaded by default.
14
-
Additionally, a subset of the supplemental `currencyData`, `likelySubtags` and `weekData` is loaded in order to support `en` dates and numbers parsing and formatting without loading any data.
13
+
In order for it to function properly, load the data for the corresponding locale. By default, the `numbers`, `currencies`, `gregorian calendar`(`"ca-gregorian"`), and `timeZoneNames` for the `en` locale are loaded. To support `en` dates and numbers parsing and formatting without loading any data, a subset of the supplemental `currencyData`, `likelySubtags`, and `weekData` is also loaded.
15
14
16
15
## Prerequisites
17
16
18
-
No data is required to be loaded if working with the `en` locale. The only case in which additional data for the `en` locale is required is currency formatting with non-default currency in which case the `cldr-data/main/en/currencies.json` data must be loaded.
19
-
The table below lists the data which is required for number and date formatting and parsing when using non-default locale.
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.
20
18
21
-
| FORMATS | REQUIRED DATA |
22
-
|:--- |:--- |
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`|
| Numeric week day formatting |`cldr/supplemental/weekData.json`|
31
29
32
-
Unicode CLDR is available as JSON at [https://github.com/unicode-cldr/](https://github.com/unicode-cldr/). For more information on the package organization, refer to [https://github.com/unicode-cldr/cldr-json](https://github.com/unicode-cldr/cldr-json) .
30
+
## Getting CLDR Data
33
31
34
-
It is also available as a single [cldr-data](https://www.npmjs.com/package/cldr-data) package.
32
+
Unicode CLDR is available as JSON at [https://github.com/unicode-cldr/](https://github.com/unicode-cldr/). For more information on the package organization, refer to [https://github.com/unicode-cldr/cldr-json](https://github.com/unicode-cldr/cldr-json). It is also available as a single [cldr-data](https://www.npmjs.com/package/cldr-data) package.
35
33
36
34
## Loading CLDR Data
37
35
38
-
Load the CLDR data using the [`load`]({% cldrapi_internalization %}#load) method.
36
+
To load the CLDR data, use the [`load`]({% cldrapi_internalization %}#load) method.
|`NoSupplementalCurrencyError` | Cannot determine currency. Please load the supplemental currencyData.
18
-
|`NoCurrencyRegionError` | No currency data for region ${territory}.
19
-
|`NoCurrencyDisplay` | Cannot determine currency display information. Please load the locale currencies data. The default culture does not include the all currencies data.
|`NoWeekDataError` | Cannot determine locale first day of week. Please load the supplemental weekData.
22
-
|`NoFirstDayError` | Cannot determine locale first day of week. The default culture data includes only en-US first day info. Please load the supplemental weekData.
15
+
|`NoLocaleError` | Missing locale information for {locale}.
16
+
|`NoCurrencyError` | Cannot determine the currency information. Load the currency data of the locale.
17
+
|`NoSupplementalCurrencyError` | Cannot determine the currency. Load the supplemental `currencyData`.
18
+
|`NoCurrencyRegionError` | Missing currency information for the region ${territory}.
19
+
|`NoCurrencyDisplay` | Cannot determine the display information for the currency. Load the currency data of the locale. The default culture does not include all currency data.
20
+
|`NoGMTInfoError` | Cannot determine the GMT format of the locale. Load the `timeZoneNames` data of the locale.
21
+
|`NoWeekDataError` | Cannot determine the first week day of the locale. Load the supplemental `weekData`.
22
+
|`NoFirstDayError` | Cannot determine the first week day of the locale. The default culture data includes only the en-US first day information. Load the supplemental `weekData`.
23
23
24
24
## Suggested Links
25
25
@@ -28,3 +28,4 @@ Below is the list of all controlled errors that could be thrown:
28
28
*[Get Started with Date Formatting]({% slug dateformatting_internalization %})
29
29
*[Get Started with Number Parsing]({% slug numberparsing_internalization %})
30
30
*[Get Started with Number Formatting]({% slug numbeformatting_internalization %})
31
+
*[Get Started with General Formatting]({% slug generalformatting_internalization %})
description: "Learn about the Kendo UI Internationalization methods for parsing and formatting dates and numbers."
5
5
slug: overview_internalization_kendoui
6
6
position: 1
7
7
---
8
8
9
9
# Internationalization Package Overview
10
10
11
-
Internationalization supports the design and development of applications that work in multiple cultures. The culture defines specific information for the number, date and time formats as well as the week and month names.
11
+
Internationalization supports the design and development of applications that work in multiple cultures. The culture defines specific information for the number, date, and time formats as well as the week and month names.
12
12
13
-
The Internationalization package provides methods for parsing and formatting dates and numbers using the [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) data.
13
+
The Internationalization provides methods for parsing and formatting dates and numbers using the [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) data.
14
14
15
-
The CLDR module provides locale information for the `dates` and `numbers` modules.
15
+
The package includes:
16
16
17
-
The Date Parsing and Date Formatting modules provide methods for parsing and formatting dates.
18
-
19
-
The Number Parsing and Number Formatting modules provide methods for parsing and formatting of numbers.
20
-
21
-
The General Formatting module provides methods for placeholder and type independent formatting.
17
+
***CLDR**—Provides locale information for the `dates` and `numbers` modules.
18
+
***Date Parsing** and **Date Formatting**—Provide methods for parsing and formatting dates.
19
+
***Number Parsing** and **Number Formatting**—Provide methods for parsing and formatting of numbers.
20
+
***General Formatting**—Provides methods for placeholder and type independent formatting.
22
21
23
22
## Suggested Links
24
23
@@ -27,3 +26,4 @@ The General Formatting module provides methods for placeholder and type independ
27
26
*[Get Started with Date Formatting]({% slug dateformatting_internalization %})
28
27
*[Get Started with Number Parsing]({% slug numberparsing_internalization %})
29
28
*[Get Started with Number Formatting]({% slug numbeformatting_internalization %})
29
+
*[Get Started with General Formatting]({% slug generalformatting_internalization %})
0 commit comments