-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.d.ts
58 lines (45 loc) · 1.53 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// import lcidCodes from './lcid.json'; // TODO: Use `with` here when TypeScript supports it.
declare const lcid: {
/**
Get a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)) from a [Windows locale identifier (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
@example
```
import lcid from 'lcid';
lcid.from(1044);
//=> 'nb_NO'
```
*/
from(lcidCode: number): string | undefined;
/**
Get a [standard locale identifier](https://en.wikipedia.org/wiki/Locale_(computer_software)) from a [Windows locale identifier (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
@example
```
import lcid from 'lcid';
lcid.from(1044);
//=> 'nb_NO'
```
*/
// from(lcidCode: keyof typeof lcidCodes): string;
/**
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)).
@example
```
import lcid from 'lcid';
lcid.to('nb_NO');
//=> 1044
```
*/
to(localeId: string): number | undefined;
/**
Mapping between [standard locale identifiers](https://en.wikipedia.org/wiki/Locale_(computer_software)) and [Windows locale identifiers (LCID)](https://en.wikipedia.org/wiki/Locale#Specifics_for_Microsoft_platforms).
@example
```
import lcid from 'lcid';
lcid.all;
//=> {'af_ZA': 1078, …}
```
*/
readonly all: Record<string, number>;
// TODO: readonly all: typeof lcidCodes;
};
export default lcid;