/
Locales.ts
107 lines (100 loc) · 2.28 KB
/
Locales.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Locales defaults
*/
export interface DeclinationLocale {
useDeclination?: boolean;
useCountZerosAfterFirstDigit?: boolean;
declinations?: {
plural: string;
singular: string;
pluar_singular: string;
};
}
export type NumberType =
| "thousand"
| "million"
| "billion"
| "trillion"
| "quadrillion"
| "quintillion"
| "sexillion";
export type BinarySuffixes = {
Bytes?: string;
KiloBytes?: string;
MegaBytes?: string;
GigaBytes?: string;
TeraBytes?: string;
PetaBytes?: string;
ExaBytes?: string;
ZettaBytes?: string;
YottaBytes?: string;
};
export interface LocaleObject extends DeclinationLocale {
locale: string;
separator: string;
excludeNumbers?: NumberType[];
binarySuffixes?: BinarySuffixes;
words: {
and: string;
others: string;
};
numbers: Record<NumberType, string>;
}
export const ru_RU: LocaleObject = {
locale: "ru_RU",
useDeclination: true,
useCountZerosAfterFirstDigit: true,
separator: ",",
declinations: {
plural: "ов",
pluar_singular: "а",
singular: "",
},
words: {
and: "и",
others: "других",
},
numbers: {
thousand: "тысяч",
million: "миллион",
billion: "миллиард",
trillion: "триллион",
quadrillion: "квадриллион",
quintillion: "квинтиллион",
sexillion: "сиксилион",
},
};
export const en_US: LocaleObject = {
locale: "en_US",
separator: ",",
words: {
and: "and",
others: "others",
},
numbers: {
thousand: "thousand",
million: "million",
billion: "billion",
trillion: "trillion",
quadrillion: "quadrillion",
quintillion: "quintillion",
sexillion: "sextillion",
},
};
export const de_DE: LocaleObject = {
locale: "de_DE",
separator: ",",
words: {
and: "und",
others: "andere",
},
numbers: {
thousand: "tausend",
million: "million",
billion: "milliarde",
trillion: "billion",
quadrillion: "quadrilliarde",
quintillion: "quintillion",
sexillion: "sextillion",
},
};