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
@@ -113,6 +120,18 @@ Example: 1234 -> one thousand two hundred **and** thirty-four
113
120
Base cardinals numbers. Numbers that have unique names and are used to build
114
121
others.
115
122
123
+
##### alternativeBase:
124
+
Alternative versions of base cardinals numbers for usage with specific units (ex. thousands in Ukrainian use feminine form of base cardinal numbers). These bases will be treated as an extension for the default `base`.
125
+
126
+
```json
127
+
"alternativeBase": {
128
+
"feminine": {
129
+
"1": "одна",
130
+
"2": "дві"
131
+
}
132
+
}
133
+
```
134
+
116
135
##### units:
117
136
Number units.
118
137
It can be:
@@ -128,7 +147,35 @@ It can be:
128
147
}
129
148
```
130
149
150
+
- Object with `few` word form.
151
+
152
+
In some languages like Ukrainian, there are specific unit forms for values from 2 (including) to 4 (including). This forms can be specified with `few`.
153
+
154
+
```json
155
+
{
156
+
"singular": "мільйон",
157
+
"few": "мільйони",
158
+
"plural": "мільйонів",
159
+
...
160
+
}
161
+
```
162
+
163
+
- Object with `useAlternativeBase`.
164
+
165
+
Selects an `alternativeBase` name which this unit should prefer over the default `base` if possible.
166
+
167
+
```json
168
+
{
169
+
"singular": "тисяча",
170
+
"few": "тисячі",
171
+
"plural": "тисяч",
172
+
"useAlternativeBase": "feminine"
173
+
...
174
+
}
175
+
```
176
+
131
177
- Object with `useBaseInstead` exception.
178
+
132
179
In some languages like spanish, specific units like "ciento", use the base
133
180
cardinal number instead.
134
181
@@ -169,6 +216,21 @@ numbers wioth trailing numbers other than 0, for example "deux cents" and "deux
169
216
}
170
217
```
171
218
219
+
- Object with `useSingularEnding` exception and `useFewEnding` exception.
220
+
221
+
In some languages like Ukrainian, singular form of the unit is also used for any values that end with 1 (21, 31, 14, ..., 101, ...) and "few" form of the unit is also used for any values that end with 2, 3 and 4 (22, 33, 44, ..., 104, ...). The `avoidEndingRules` exception provides values (1 to 999) where these rules must be ignored and the plural form must be used instead.
0 commit comments