1 | import lcidCodes = require('./lcid.json');
|
2 |
|
3 | declare const lcid: {
|
4 | /**
|
5 | Get a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)) from a [Windows locale identifier (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
|
6 |
|
7 | @example
|
8 | ```
|
9 | import lcid = require('lcid');
|
10 |
|
11 | lcid.from(1044);
|
12 | //=> 'nb_NO'
|
13 | ```
|
14 | */
|
15 | from(lcidCode: number): string;
|
16 |
|
17 | /**
|
18 | Get a [Windows locale identifier (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms) from a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)).
|
19 |
|
20 | @example
|
21 | ```
|
22 | import lcid = require('lcid');
|
23 |
|
24 | lcid.to('nb_NO');
|
25 | //=> 1044
|
26 | ```
|
27 | */
|
28 | to(localeId: string): number;
|
29 |
|
30 | /**
|
31 | Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](http://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
|
32 |
|
33 | @example
|
34 | ```
|
35 | import lcid = require('lcid');
|
36 |
|
37 | lcid.all;
|
38 | //=> {'af_ZA': 1078, …}
|
39 | ```
|
40 | */
|
41 | readonly all: typeof lcidCodes;
|
42 | };
|
43 |
|
44 | export = lcid;
|