@wix/site-service-locale 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cjs/build/definition/index.d.ts +42 -0
- package/cjs/build/definition/index.js +1 -0
- package/cjs/build/definition/index.js.map +1 -1
- package/cjs/build/types/index.d.ts +372 -2
- package/dist/definition/index.d.ts +42 -0
- package/dist/definition/index.js +1 -0
- package/dist/definition/index.js.map +1 -1
- package/dist/types/index.d.ts +372 -2
- package/package.json +4 -4
- package/src/definition/index.ts +42 -0
- package/src/types/index.ts +189 -1
package/README.md
CHANGED
|
@@ -6,14 +6,56 @@ export type ILocaleServiceConfig = {
|
|
|
6
6
|
locale: string;
|
|
7
7
|
timeZone: string;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Reports the site's language, text direction, regional format, and time zone, so code running on the
|
|
11
|
+
* site can format and lay out content to match the site's settings.
|
|
12
|
+
*/
|
|
9
13
|
export interface ILocaleService {
|
|
14
|
+
/**
|
|
15
|
+
* Site's main language, as a 2-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code.
|
|
16
|
+
*
|
|
17
|
+
* On a site with [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview),
|
|
18
|
+
* this is the main language, even when a site visitor views the site in another language.
|
|
19
|
+
*
|
|
20
|
+
* The code has no region, so formatting dates and numbers with it alone loses regional conventions.
|
|
21
|
+
* Use `locale` for formatting.
|
|
22
|
+
*
|
|
23
|
+
* One value isn't an ISO 639-1 code: `jp`, a legacy code for Japanese. `Intl` expects `ja`.
|
|
24
|
+
*
|
|
25
|
+
* @exampleValue 'en'
|
|
26
|
+
*/
|
|
10
27
|
readonly language: Language;
|
|
28
|
+
/**
|
|
29
|
+
* Text direction of the site's language.
|
|
30
|
+
*
|
|
31
|
+
* @exampleValue 'ltr'
|
|
32
|
+
*/
|
|
11
33
|
readonly direction: LanguageDirection;
|
|
34
|
+
/**
|
|
35
|
+
* Site's regional format, as a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
36
|
+
*
|
|
37
|
+
* It's the site's setting, not the site visitor's browser language. Specify it as the locale for
|
|
38
|
+
* `Intl` date and number formatting, so dates and numbers follow the site's conventions for every
|
|
39
|
+
* site visitor.
|
|
40
|
+
*
|
|
41
|
+
* @exampleValue 'en-US'
|
|
42
|
+
*/
|
|
12
43
|
readonly locale: string;
|
|
44
|
+
/**
|
|
45
|
+
* Site's time zone, as an [IANA time zone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
46
|
+
*
|
|
47
|
+
* It's the time zone set for the site's business, not the site visitor's time zone. Specify it as
|
|
48
|
+
* the `timeZone` option of `Intl.DateTimeFormat` to show times in the site's time zone.
|
|
49
|
+
*
|
|
50
|
+
* @exampleValue 'America/New_York'
|
|
51
|
+
*/
|
|
13
52
|
readonly timeZone: string;
|
|
53
|
+
/** @internal Host-only. Replaces config values when the host's state changes. */
|
|
14
54
|
_updateConfig: (config: Partial<ILocaleServiceConfig>) => void;
|
|
15
55
|
}
|
|
56
|
+
/** Definition of the Locale service, used to resolve it from the services manager. */
|
|
16
57
|
export type ILocaleDefinition = ServiceDefinition<ILocaleService, ILocaleServiceConfig>;
|
|
58
|
+
/** Definition of the Locale service. Specify it in `useService()` or `servicesManager.getService()`. */
|
|
17
59
|
export declare const LocaleDefinition: string & {
|
|
18
60
|
__api: ILocaleService;
|
|
19
61
|
__config: ILocaleServiceConfig;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LocaleDefinition = void 0;
|
|
4
4
|
const services_definitions_1 = require("@wix/services-definitions");
|
|
5
|
+
/** Definition of the Locale service. Specify it in `useService()` or `servicesManager.getService()`. */
|
|
5
6
|
exports.LocaleDefinition = (0, services_definitions_1.defineService)('@wix/site-service-locale');
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AA8DzD,wGAAwG;AAC3F,QAAA,gBAAgB,GAAG,IAAA,oCAAa,EAAuC,0BAA0B,CAAC,CAAA"}
|
|
@@ -1,3 +1,373 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
1
|
+
/** Text direction of a language, either left to right or right to left. */
|
|
2
|
+
export type LanguageDirection =
|
|
3
|
+
/** Left to right. */
|
|
4
|
+
'ltr'
|
|
5
|
+
/** Right to left. */
|
|
6
|
+
| 'rtl';
|
|
7
|
+
/** 2-letter language code. */
|
|
8
|
+
export type Language =
|
|
9
|
+
/** Persian. */
|
|
10
|
+
'fa'
|
|
11
|
+
/** Faroese. */
|
|
12
|
+
| 'fo'
|
|
13
|
+
/** Pashto. */
|
|
14
|
+
| 'ps'
|
|
15
|
+
/** Albanian. */
|
|
16
|
+
| 'sq'
|
|
17
|
+
/** Armenian. */
|
|
18
|
+
| 'hy'
|
|
19
|
+
/** Bengali. */
|
|
20
|
+
| 'bn'
|
|
21
|
+
/** Belarusian. */
|
|
22
|
+
| 'be'
|
|
23
|
+
/** Yoruba. */
|
|
24
|
+
| 'yo'
|
|
25
|
+
/** Bosnian. */
|
|
26
|
+
| 'bs'
|
|
27
|
+
/** Portuguese. */
|
|
28
|
+
| 'pt'
|
|
29
|
+
/** Bulgarian. */
|
|
30
|
+
| 'bg'
|
|
31
|
+
/** Khmer. */
|
|
32
|
+
| 'km'
|
|
33
|
+
/** Chinese. */
|
|
34
|
+
| 'zh'
|
|
35
|
+
/** Croatian. */
|
|
36
|
+
| 'hr'
|
|
37
|
+
/** Danish. */
|
|
38
|
+
| 'da'
|
|
39
|
+
/** Estonian. */
|
|
40
|
+
| 'et'
|
|
41
|
+
/** Fijian. */
|
|
42
|
+
| 'fj'
|
|
43
|
+
/** Finnish. */
|
|
44
|
+
| 'fi'
|
|
45
|
+
/** French. */
|
|
46
|
+
| 'fr'
|
|
47
|
+
/** German. */
|
|
48
|
+
| 'de'
|
|
49
|
+
/** Greek. */
|
|
50
|
+
| 'el'
|
|
51
|
+
/** Haitian Creole. */
|
|
52
|
+
| 'ht'
|
|
53
|
+
/** Hungarian. */
|
|
54
|
+
| 'hu'
|
|
55
|
+
/** Icelandic. */
|
|
56
|
+
| 'is'
|
|
57
|
+
/** Gujarati. */
|
|
58
|
+
| 'gu'
|
|
59
|
+
/** Hindi. */
|
|
60
|
+
| 'hi'
|
|
61
|
+
/** Kalaallisut. */
|
|
62
|
+
| 'kl'
|
|
63
|
+
/** Kannada. */
|
|
64
|
+
| 'kn'
|
|
65
|
+
/** Malayalam. */
|
|
66
|
+
| 'ml'
|
|
67
|
+
/** Sindhi. */
|
|
68
|
+
| 'sd'
|
|
69
|
+
/** Tamil. */
|
|
70
|
+
| 'ta'
|
|
71
|
+
/** Telugu. */
|
|
72
|
+
| 'te'
|
|
73
|
+
/** Indonesian. */
|
|
74
|
+
| 'id'
|
|
75
|
+
/** Sundanese. */
|
|
76
|
+
| 'su'
|
|
77
|
+
/** Kurdish. */
|
|
78
|
+
| 'ku'
|
|
79
|
+
/** Irish. */
|
|
80
|
+
| 'ga'
|
|
81
|
+
/** Galician. */
|
|
82
|
+
| 'gl'
|
|
83
|
+
/** Hebrew. */
|
|
84
|
+
| 'he'
|
|
85
|
+
/** Yiddish. */
|
|
86
|
+
| 'yi'
|
|
87
|
+
/** Corsican. */
|
|
88
|
+
| 'co'
|
|
89
|
+
/** Italian. */
|
|
90
|
+
| 'it'
|
|
91
|
+
/** Latin. */
|
|
92
|
+
| 'la'
|
|
93
|
+
/** Luxembourgish. */
|
|
94
|
+
| 'lb'
|
|
95
|
+
/** Japanese. */
|
|
96
|
+
| 'ja'
|
|
97
|
+
/** Japanese, as a legacy code. The ISO 639-1 code is `ja`. */
|
|
98
|
+
| 'jp'
|
|
99
|
+
/** Kazakh. */
|
|
100
|
+
| 'kk'
|
|
101
|
+
/** Swahili. */
|
|
102
|
+
| 'sw'
|
|
103
|
+
/** Lingala. */
|
|
104
|
+
| 'ln'
|
|
105
|
+
/** Lao. */
|
|
106
|
+
| 'lo'
|
|
107
|
+
/** Latvian. */
|
|
108
|
+
| 'lv'
|
|
109
|
+
/** Lithuanian. */
|
|
110
|
+
| 'lt'
|
|
111
|
+
/** Maori. */
|
|
112
|
+
| 'mi'
|
|
113
|
+
/** Macedonian. */
|
|
114
|
+
| 'mk'
|
|
115
|
+
/** Malagasy. */
|
|
116
|
+
| 'mg'
|
|
117
|
+
/** Marathi. */
|
|
118
|
+
| 'mr'
|
|
119
|
+
/** Malay. */
|
|
120
|
+
| 'ms'
|
|
121
|
+
/** Maltese. */
|
|
122
|
+
| 'mt'
|
|
123
|
+
/** Burmese. */
|
|
124
|
+
| 'my'
|
|
125
|
+
/** Mongolian. */
|
|
126
|
+
| 'mn'
|
|
127
|
+
/** Nepali. */
|
|
128
|
+
| 'ne'
|
|
129
|
+
/** Hausa. */
|
|
130
|
+
| 'ha'
|
|
131
|
+
/** Igbo. */
|
|
132
|
+
| 'ig'
|
|
133
|
+
/** Norwegian. */
|
|
134
|
+
| 'no'
|
|
135
|
+
/** Tagalog. */
|
|
136
|
+
| 'tl'
|
|
137
|
+
/** Polish. */
|
|
138
|
+
| 'pl'
|
|
139
|
+
/** Romanian. */
|
|
140
|
+
| 'ro'
|
|
141
|
+
/** Russian. */
|
|
142
|
+
| 'ru'
|
|
143
|
+
/** Northern Sami. */
|
|
144
|
+
| 'se'
|
|
145
|
+
/** Samoan. */
|
|
146
|
+
| 'sm'
|
|
147
|
+
/** Serbian. */
|
|
148
|
+
| 'sr'
|
|
149
|
+
/** Slovak. */
|
|
150
|
+
| 'sk'
|
|
151
|
+
/** Sinhala. */
|
|
152
|
+
| 'si'
|
|
153
|
+
/** Slovenian. */
|
|
154
|
+
| 'sl'
|
|
155
|
+
/** Somali. */
|
|
156
|
+
| 'so'
|
|
157
|
+
/** Afrikaans. */
|
|
158
|
+
| 'af'
|
|
159
|
+
/** Xhosa. */
|
|
160
|
+
| 'xh'
|
|
161
|
+
/** Zulu. */
|
|
162
|
+
| 'zu'
|
|
163
|
+
/** Korean. */
|
|
164
|
+
| 'ko'
|
|
165
|
+
/** Basque. */
|
|
166
|
+
| 'eu'
|
|
167
|
+
/** Catalan. */
|
|
168
|
+
| 'ca'
|
|
169
|
+
/** Spanish. */
|
|
170
|
+
| 'es'
|
|
171
|
+
/** Swedish. */
|
|
172
|
+
| 'sv'
|
|
173
|
+
/** Tajik. */
|
|
174
|
+
| 'tg'
|
|
175
|
+
/** Thai. */
|
|
176
|
+
| 'th'
|
|
177
|
+
/** Turkish. */
|
|
178
|
+
| 'tr'
|
|
179
|
+
/** Uyghur. */
|
|
180
|
+
| 'ug'
|
|
181
|
+
/** Ukrainian. */
|
|
182
|
+
| 'uk'
|
|
183
|
+
/** Welsh. */
|
|
184
|
+
| 'cy'
|
|
185
|
+
/** English. */
|
|
186
|
+
| 'en'
|
|
187
|
+
/** Uzbek. */
|
|
188
|
+
| 'uz'
|
|
189
|
+
/** Vietnamese. */
|
|
190
|
+
| 'vi'
|
|
191
|
+
/** Chichewa. */
|
|
192
|
+
| 'ny'
|
|
193
|
+
/** Shona. */
|
|
194
|
+
| 'sn'
|
|
195
|
+
/** Azerbaijani. */
|
|
196
|
+
| 'az'
|
|
197
|
+
/** Czech. */
|
|
198
|
+
| 'cs'
|
|
199
|
+
/** Amharic. */
|
|
200
|
+
| 'am'
|
|
201
|
+
/** Georgian. */
|
|
202
|
+
| 'ka'
|
|
203
|
+
/** Kyrgyz. */
|
|
204
|
+
| 'ky'
|
|
205
|
+
/** Dutch. */
|
|
206
|
+
| 'nl'
|
|
207
|
+
/** Urdu. */
|
|
208
|
+
| 'ur'
|
|
209
|
+
/** Arabic. */
|
|
210
|
+
| 'ar'
|
|
211
|
+
/** Quechua. */
|
|
212
|
+
| 'qu'
|
|
213
|
+
/** Turkmen. */
|
|
214
|
+
| 'tk'
|
|
215
|
+
/** Afar. */
|
|
216
|
+
| 'aa'
|
|
217
|
+
/** Abkhazian. */
|
|
218
|
+
| 'ab'
|
|
219
|
+
/** Avestan. */
|
|
220
|
+
| 'ae'
|
|
221
|
+
/** Akan. */
|
|
222
|
+
| 'ak'
|
|
223
|
+
/** Aragonese. */
|
|
224
|
+
| 'an'
|
|
225
|
+
/** Assamese. */
|
|
226
|
+
| 'as'
|
|
227
|
+
/** Avaric. */
|
|
228
|
+
| 'av'
|
|
229
|
+
/** Aymara. */
|
|
230
|
+
| 'ay'
|
|
231
|
+
/** Bashkir. */
|
|
232
|
+
| 'ba'
|
|
233
|
+
/** Bihari. */
|
|
234
|
+
| 'bh'
|
|
235
|
+
/** Bislama. */
|
|
236
|
+
| 'bi'
|
|
237
|
+
/** Bambara. */
|
|
238
|
+
| 'bm'
|
|
239
|
+
/** Tibetan. */
|
|
240
|
+
| 'bo'
|
|
241
|
+
/** Breton. */
|
|
242
|
+
| 'br'
|
|
243
|
+
/** Chechen. */
|
|
244
|
+
| 'ce'
|
|
245
|
+
/** Chamorro. */
|
|
246
|
+
| 'ch'
|
|
247
|
+
/** Cree. */
|
|
248
|
+
| 'cr'
|
|
249
|
+
/** Church Slavonic. */
|
|
250
|
+
| 'cu'
|
|
251
|
+
/** Chuvash. */
|
|
252
|
+
| 'cv'
|
|
253
|
+
/** Divehi. */
|
|
254
|
+
| 'dv'
|
|
255
|
+
/** Dzongkha. */
|
|
256
|
+
| 'dz'
|
|
257
|
+
/** Ewe. */
|
|
258
|
+
| 'ee'
|
|
259
|
+
/** Esperanto. */
|
|
260
|
+
| 'eo'
|
|
261
|
+
/** Fula. */
|
|
262
|
+
| 'ff'
|
|
263
|
+
/** Western Frisian. */
|
|
264
|
+
| 'fy'
|
|
265
|
+
/** Scottish Gaelic. */
|
|
266
|
+
| 'gd'
|
|
267
|
+
/** Guarani. */
|
|
268
|
+
| 'gn'
|
|
269
|
+
/** Manx. */
|
|
270
|
+
| 'gv'
|
|
271
|
+
/** Hiri Motu. */
|
|
272
|
+
| 'ho'
|
|
273
|
+
/** Herero. */
|
|
274
|
+
| 'hz'
|
|
275
|
+
/** Interlingua. */
|
|
276
|
+
| 'ia'
|
|
277
|
+
/** Interlingue. */
|
|
278
|
+
| 'ie'
|
|
279
|
+
/** Sichuan Yi. */
|
|
280
|
+
| 'ii'
|
|
281
|
+
/** Inupiaq. */
|
|
282
|
+
| 'ik'
|
|
283
|
+
/** Ido. */
|
|
284
|
+
| 'io'
|
|
285
|
+
/** Inuktitut. */
|
|
286
|
+
| 'iu'
|
|
287
|
+
/** Javanese. */
|
|
288
|
+
| 'jv'
|
|
289
|
+
/** Kikuyu. */
|
|
290
|
+
| 'ki'
|
|
291
|
+
/** Kanuri. */
|
|
292
|
+
| 'kr'
|
|
293
|
+
/** Kashmiri. */
|
|
294
|
+
| 'ks'
|
|
295
|
+
/** Cornish. */
|
|
296
|
+
| 'kw'
|
|
297
|
+
/** Ganda. */
|
|
298
|
+
| 'lg'
|
|
299
|
+
/** Limburgish. */
|
|
300
|
+
| 'li'
|
|
301
|
+
/** Luba-Katanga. */
|
|
302
|
+
| 'lu'
|
|
303
|
+
/** Marshallese. */
|
|
304
|
+
| 'mh'
|
|
305
|
+
/** Nauru. */
|
|
306
|
+
| 'na'
|
|
307
|
+
/** Norwegian Bokmål. */
|
|
308
|
+
| 'nb'
|
|
309
|
+
/** North Ndebele. */
|
|
310
|
+
| 'nd'
|
|
311
|
+
/** Ndonga. */
|
|
312
|
+
| 'ng'
|
|
313
|
+
/** Norwegian Nynorsk. */
|
|
314
|
+
| 'nn'
|
|
315
|
+
/** South Ndebele. */
|
|
316
|
+
| 'nr'
|
|
317
|
+
/** Navajo. */
|
|
318
|
+
| 'nv'
|
|
319
|
+
/** Occitan. */
|
|
320
|
+
| 'oc'
|
|
321
|
+
/** Ojibwe. */
|
|
322
|
+
| 'oj'
|
|
323
|
+
/** Oromo. */
|
|
324
|
+
| 'om'
|
|
325
|
+
/** Odia. */
|
|
326
|
+
| 'or'
|
|
327
|
+
/** Ossetian. */
|
|
328
|
+
| 'os'
|
|
329
|
+
/** Punjabi. */
|
|
330
|
+
| 'pa'
|
|
331
|
+
/** Pali. */
|
|
332
|
+
| 'pi'
|
|
333
|
+
/** Romansh. */
|
|
334
|
+
| 'rm'
|
|
335
|
+
/** Kirundi. */
|
|
336
|
+
| 'rn'
|
|
337
|
+
/** Kinyarwanda. */
|
|
338
|
+
| 'rw'
|
|
339
|
+
/** Sanskrit. */
|
|
340
|
+
| 'sa'
|
|
341
|
+
/** Sardinian. */
|
|
342
|
+
| 'sc'
|
|
343
|
+
/** Sango. */
|
|
344
|
+
| 'sg'
|
|
345
|
+
/** Swati. */
|
|
346
|
+
| 'ss'
|
|
347
|
+
/** Southern Sotho. */
|
|
348
|
+
| 'st'
|
|
349
|
+
/** Tigrinya. */
|
|
350
|
+
| 'ti'
|
|
351
|
+
/** Tswana. */
|
|
352
|
+
| 'tn'
|
|
353
|
+
/** Tongan. */
|
|
354
|
+
| 'to'
|
|
355
|
+
/** Tsonga. */
|
|
356
|
+
| 'ts'
|
|
357
|
+
/** Tatar. */
|
|
358
|
+
| 'tt'
|
|
359
|
+
/** Twi. */
|
|
360
|
+
| 'tw'
|
|
361
|
+
/** Tahitian. */
|
|
362
|
+
| 'ty'
|
|
363
|
+
/** Venda. */
|
|
364
|
+
| 've'
|
|
365
|
+
/** Volapük. */
|
|
366
|
+
| 'vo'
|
|
367
|
+
/** Walloon. */
|
|
368
|
+
| 'wa'
|
|
369
|
+
/** Wolof. */
|
|
370
|
+
| 'wo'
|
|
371
|
+
/** Zhuang. */
|
|
372
|
+
| 'za';
|
|
3
373
|
export type { ILocaleService, ILocaleServiceConfig, ILocaleDefinition } from '../definition';
|
|
@@ -6,14 +6,56 @@ export type ILocaleServiceConfig = {
|
|
|
6
6
|
locale: string;
|
|
7
7
|
timeZone: string;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Reports the site's language, text direction, regional format, and time zone, so code running on the
|
|
11
|
+
* site can format and lay out content to match the site's settings.
|
|
12
|
+
*/
|
|
9
13
|
export interface ILocaleService {
|
|
14
|
+
/**
|
|
15
|
+
* Site's main language, as a 2-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code.
|
|
16
|
+
*
|
|
17
|
+
* On a site with [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview),
|
|
18
|
+
* this is the main language, even when a site visitor views the site in another language.
|
|
19
|
+
*
|
|
20
|
+
* The code has no region, so formatting dates and numbers with it alone loses regional conventions.
|
|
21
|
+
* Use `locale` for formatting.
|
|
22
|
+
*
|
|
23
|
+
* One value isn't an ISO 639-1 code: `jp`, a legacy code for Japanese. `Intl` expects `ja`.
|
|
24
|
+
*
|
|
25
|
+
* @exampleValue 'en'
|
|
26
|
+
*/
|
|
10
27
|
readonly language: Language;
|
|
28
|
+
/**
|
|
29
|
+
* Text direction of the site's language.
|
|
30
|
+
*
|
|
31
|
+
* @exampleValue 'ltr'
|
|
32
|
+
*/
|
|
11
33
|
readonly direction: LanguageDirection;
|
|
34
|
+
/**
|
|
35
|
+
* Site's regional format, as a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
36
|
+
*
|
|
37
|
+
* It's the site's setting, not the site visitor's browser language. Specify it as the locale for
|
|
38
|
+
* `Intl` date and number formatting, so dates and numbers follow the site's conventions for every
|
|
39
|
+
* site visitor.
|
|
40
|
+
*
|
|
41
|
+
* @exampleValue 'en-US'
|
|
42
|
+
*/
|
|
12
43
|
readonly locale: string;
|
|
44
|
+
/**
|
|
45
|
+
* Site's time zone, as an [IANA time zone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
46
|
+
*
|
|
47
|
+
* It's the time zone set for the site's business, not the site visitor's time zone. Specify it as
|
|
48
|
+
* the `timeZone` option of `Intl.DateTimeFormat` to show times in the site's time zone.
|
|
49
|
+
*
|
|
50
|
+
* @exampleValue 'America/New_York'
|
|
51
|
+
*/
|
|
13
52
|
readonly timeZone: string;
|
|
53
|
+
/** @internal Host-only. Replaces config values when the host's state changes. */
|
|
14
54
|
_updateConfig: (config: Partial<ILocaleServiceConfig>) => void;
|
|
15
55
|
}
|
|
56
|
+
/** Definition of the Locale service, used to resolve it from the services manager. */
|
|
16
57
|
export type ILocaleDefinition = ServiceDefinition<ILocaleService, ILocaleServiceConfig>;
|
|
58
|
+
/** Definition of the Locale service. Specify it in `useService()` or `servicesManager.getService()`. */
|
|
17
59
|
export declare const LocaleDefinition: string & {
|
|
18
60
|
__api: ILocaleService;
|
|
19
61
|
__config: ILocaleServiceConfig;
|
package/dist/definition/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { defineService } from '@wix/services-definitions';
|
|
2
|
+
/** Definition of the Locale service. Specify it in `useService()` or `servicesManager.getService()`. */
|
|
2
3
|
export const LocaleDefinition = defineService('@wix/site-service-locale');
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AA8DzD,wGAAwG;AACxG,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAuC,0BAA0B,CAAC,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,373 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
1
|
+
/** Text direction of a language, either left to right or right to left. */
|
|
2
|
+
export type LanguageDirection =
|
|
3
|
+
/** Left to right. */
|
|
4
|
+
'ltr'
|
|
5
|
+
/** Right to left. */
|
|
6
|
+
| 'rtl';
|
|
7
|
+
/** 2-letter language code. */
|
|
8
|
+
export type Language =
|
|
9
|
+
/** Persian. */
|
|
10
|
+
'fa'
|
|
11
|
+
/** Faroese. */
|
|
12
|
+
| 'fo'
|
|
13
|
+
/** Pashto. */
|
|
14
|
+
| 'ps'
|
|
15
|
+
/** Albanian. */
|
|
16
|
+
| 'sq'
|
|
17
|
+
/** Armenian. */
|
|
18
|
+
| 'hy'
|
|
19
|
+
/** Bengali. */
|
|
20
|
+
| 'bn'
|
|
21
|
+
/** Belarusian. */
|
|
22
|
+
| 'be'
|
|
23
|
+
/** Yoruba. */
|
|
24
|
+
| 'yo'
|
|
25
|
+
/** Bosnian. */
|
|
26
|
+
| 'bs'
|
|
27
|
+
/** Portuguese. */
|
|
28
|
+
| 'pt'
|
|
29
|
+
/** Bulgarian. */
|
|
30
|
+
| 'bg'
|
|
31
|
+
/** Khmer. */
|
|
32
|
+
| 'km'
|
|
33
|
+
/** Chinese. */
|
|
34
|
+
| 'zh'
|
|
35
|
+
/** Croatian. */
|
|
36
|
+
| 'hr'
|
|
37
|
+
/** Danish. */
|
|
38
|
+
| 'da'
|
|
39
|
+
/** Estonian. */
|
|
40
|
+
| 'et'
|
|
41
|
+
/** Fijian. */
|
|
42
|
+
| 'fj'
|
|
43
|
+
/** Finnish. */
|
|
44
|
+
| 'fi'
|
|
45
|
+
/** French. */
|
|
46
|
+
| 'fr'
|
|
47
|
+
/** German. */
|
|
48
|
+
| 'de'
|
|
49
|
+
/** Greek. */
|
|
50
|
+
| 'el'
|
|
51
|
+
/** Haitian Creole. */
|
|
52
|
+
| 'ht'
|
|
53
|
+
/** Hungarian. */
|
|
54
|
+
| 'hu'
|
|
55
|
+
/** Icelandic. */
|
|
56
|
+
| 'is'
|
|
57
|
+
/** Gujarati. */
|
|
58
|
+
| 'gu'
|
|
59
|
+
/** Hindi. */
|
|
60
|
+
| 'hi'
|
|
61
|
+
/** Kalaallisut. */
|
|
62
|
+
| 'kl'
|
|
63
|
+
/** Kannada. */
|
|
64
|
+
| 'kn'
|
|
65
|
+
/** Malayalam. */
|
|
66
|
+
| 'ml'
|
|
67
|
+
/** Sindhi. */
|
|
68
|
+
| 'sd'
|
|
69
|
+
/** Tamil. */
|
|
70
|
+
| 'ta'
|
|
71
|
+
/** Telugu. */
|
|
72
|
+
| 'te'
|
|
73
|
+
/** Indonesian. */
|
|
74
|
+
| 'id'
|
|
75
|
+
/** Sundanese. */
|
|
76
|
+
| 'su'
|
|
77
|
+
/** Kurdish. */
|
|
78
|
+
| 'ku'
|
|
79
|
+
/** Irish. */
|
|
80
|
+
| 'ga'
|
|
81
|
+
/** Galician. */
|
|
82
|
+
| 'gl'
|
|
83
|
+
/** Hebrew. */
|
|
84
|
+
| 'he'
|
|
85
|
+
/** Yiddish. */
|
|
86
|
+
| 'yi'
|
|
87
|
+
/** Corsican. */
|
|
88
|
+
| 'co'
|
|
89
|
+
/** Italian. */
|
|
90
|
+
| 'it'
|
|
91
|
+
/** Latin. */
|
|
92
|
+
| 'la'
|
|
93
|
+
/** Luxembourgish. */
|
|
94
|
+
| 'lb'
|
|
95
|
+
/** Japanese. */
|
|
96
|
+
| 'ja'
|
|
97
|
+
/** Japanese, as a legacy code. The ISO 639-1 code is `ja`. */
|
|
98
|
+
| 'jp'
|
|
99
|
+
/** Kazakh. */
|
|
100
|
+
| 'kk'
|
|
101
|
+
/** Swahili. */
|
|
102
|
+
| 'sw'
|
|
103
|
+
/** Lingala. */
|
|
104
|
+
| 'ln'
|
|
105
|
+
/** Lao. */
|
|
106
|
+
| 'lo'
|
|
107
|
+
/** Latvian. */
|
|
108
|
+
| 'lv'
|
|
109
|
+
/** Lithuanian. */
|
|
110
|
+
| 'lt'
|
|
111
|
+
/** Maori. */
|
|
112
|
+
| 'mi'
|
|
113
|
+
/** Macedonian. */
|
|
114
|
+
| 'mk'
|
|
115
|
+
/** Malagasy. */
|
|
116
|
+
| 'mg'
|
|
117
|
+
/** Marathi. */
|
|
118
|
+
| 'mr'
|
|
119
|
+
/** Malay. */
|
|
120
|
+
| 'ms'
|
|
121
|
+
/** Maltese. */
|
|
122
|
+
| 'mt'
|
|
123
|
+
/** Burmese. */
|
|
124
|
+
| 'my'
|
|
125
|
+
/** Mongolian. */
|
|
126
|
+
| 'mn'
|
|
127
|
+
/** Nepali. */
|
|
128
|
+
| 'ne'
|
|
129
|
+
/** Hausa. */
|
|
130
|
+
| 'ha'
|
|
131
|
+
/** Igbo. */
|
|
132
|
+
| 'ig'
|
|
133
|
+
/** Norwegian. */
|
|
134
|
+
| 'no'
|
|
135
|
+
/** Tagalog. */
|
|
136
|
+
| 'tl'
|
|
137
|
+
/** Polish. */
|
|
138
|
+
| 'pl'
|
|
139
|
+
/** Romanian. */
|
|
140
|
+
| 'ro'
|
|
141
|
+
/** Russian. */
|
|
142
|
+
| 'ru'
|
|
143
|
+
/** Northern Sami. */
|
|
144
|
+
| 'se'
|
|
145
|
+
/** Samoan. */
|
|
146
|
+
| 'sm'
|
|
147
|
+
/** Serbian. */
|
|
148
|
+
| 'sr'
|
|
149
|
+
/** Slovak. */
|
|
150
|
+
| 'sk'
|
|
151
|
+
/** Sinhala. */
|
|
152
|
+
| 'si'
|
|
153
|
+
/** Slovenian. */
|
|
154
|
+
| 'sl'
|
|
155
|
+
/** Somali. */
|
|
156
|
+
| 'so'
|
|
157
|
+
/** Afrikaans. */
|
|
158
|
+
| 'af'
|
|
159
|
+
/** Xhosa. */
|
|
160
|
+
| 'xh'
|
|
161
|
+
/** Zulu. */
|
|
162
|
+
| 'zu'
|
|
163
|
+
/** Korean. */
|
|
164
|
+
| 'ko'
|
|
165
|
+
/** Basque. */
|
|
166
|
+
| 'eu'
|
|
167
|
+
/** Catalan. */
|
|
168
|
+
| 'ca'
|
|
169
|
+
/** Spanish. */
|
|
170
|
+
| 'es'
|
|
171
|
+
/** Swedish. */
|
|
172
|
+
| 'sv'
|
|
173
|
+
/** Tajik. */
|
|
174
|
+
| 'tg'
|
|
175
|
+
/** Thai. */
|
|
176
|
+
| 'th'
|
|
177
|
+
/** Turkish. */
|
|
178
|
+
| 'tr'
|
|
179
|
+
/** Uyghur. */
|
|
180
|
+
| 'ug'
|
|
181
|
+
/** Ukrainian. */
|
|
182
|
+
| 'uk'
|
|
183
|
+
/** Welsh. */
|
|
184
|
+
| 'cy'
|
|
185
|
+
/** English. */
|
|
186
|
+
| 'en'
|
|
187
|
+
/** Uzbek. */
|
|
188
|
+
| 'uz'
|
|
189
|
+
/** Vietnamese. */
|
|
190
|
+
| 'vi'
|
|
191
|
+
/** Chichewa. */
|
|
192
|
+
| 'ny'
|
|
193
|
+
/** Shona. */
|
|
194
|
+
| 'sn'
|
|
195
|
+
/** Azerbaijani. */
|
|
196
|
+
| 'az'
|
|
197
|
+
/** Czech. */
|
|
198
|
+
| 'cs'
|
|
199
|
+
/** Amharic. */
|
|
200
|
+
| 'am'
|
|
201
|
+
/** Georgian. */
|
|
202
|
+
| 'ka'
|
|
203
|
+
/** Kyrgyz. */
|
|
204
|
+
| 'ky'
|
|
205
|
+
/** Dutch. */
|
|
206
|
+
| 'nl'
|
|
207
|
+
/** Urdu. */
|
|
208
|
+
| 'ur'
|
|
209
|
+
/** Arabic. */
|
|
210
|
+
| 'ar'
|
|
211
|
+
/** Quechua. */
|
|
212
|
+
| 'qu'
|
|
213
|
+
/** Turkmen. */
|
|
214
|
+
| 'tk'
|
|
215
|
+
/** Afar. */
|
|
216
|
+
| 'aa'
|
|
217
|
+
/** Abkhazian. */
|
|
218
|
+
| 'ab'
|
|
219
|
+
/** Avestan. */
|
|
220
|
+
| 'ae'
|
|
221
|
+
/** Akan. */
|
|
222
|
+
| 'ak'
|
|
223
|
+
/** Aragonese. */
|
|
224
|
+
| 'an'
|
|
225
|
+
/** Assamese. */
|
|
226
|
+
| 'as'
|
|
227
|
+
/** Avaric. */
|
|
228
|
+
| 'av'
|
|
229
|
+
/** Aymara. */
|
|
230
|
+
| 'ay'
|
|
231
|
+
/** Bashkir. */
|
|
232
|
+
| 'ba'
|
|
233
|
+
/** Bihari. */
|
|
234
|
+
| 'bh'
|
|
235
|
+
/** Bislama. */
|
|
236
|
+
| 'bi'
|
|
237
|
+
/** Bambara. */
|
|
238
|
+
| 'bm'
|
|
239
|
+
/** Tibetan. */
|
|
240
|
+
| 'bo'
|
|
241
|
+
/** Breton. */
|
|
242
|
+
| 'br'
|
|
243
|
+
/** Chechen. */
|
|
244
|
+
| 'ce'
|
|
245
|
+
/** Chamorro. */
|
|
246
|
+
| 'ch'
|
|
247
|
+
/** Cree. */
|
|
248
|
+
| 'cr'
|
|
249
|
+
/** Church Slavonic. */
|
|
250
|
+
| 'cu'
|
|
251
|
+
/** Chuvash. */
|
|
252
|
+
| 'cv'
|
|
253
|
+
/** Divehi. */
|
|
254
|
+
| 'dv'
|
|
255
|
+
/** Dzongkha. */
|
|
256
|
+
| 'dz'
|
|
257
|
+
/** Ewe. */
|
|
258
|
+
| 'ee'
|
|
259
|
+
/** Esperanto. */
|
|
260
|
+
| 'eo'
|
|
261
|
+
/** Fula. */
|
|
262
|
+
| 'ff'
|
|
263
|
+
/** Western Frisian. */
|
|
264
|
+
| 'fy'
|
|
265
|
+
/** Scottish Gaelic. */
|
|
266
|
+
| 'gd'
|
|
267
|
+
/** Guarani. */
|
|
268
|
+
| 'gn'
|
|
269
|
+
/** Manx. */
|
|
270
|
+
| 'gv'
|
|
271
|
+
/** Hiri Motu. */
|
|
272
|
+
| 'ho'
|
|
273
|
+
/** Herero. */
|
|
274
|
+
| 'hz'
|
|
275
|
+
/** Interlingua. */
|
|
276
|
+
| 'ia'
|
|
277
|
+
/** Interlingue. */
|
|
278
|
+
| 'ie'
|
|
279
|
+
/** Sichuan Yi. */
|
|
280
|
+
| 'ii'
|
|
281
|
+
/** Inupiaq. */
|
|
282
|
+
| 'ik'
|
|
283
|
+
/** Ido. */
|
|
284
|
+
| 'io'
|
|
285
|
+
/** Inuktitut. */
|
|
286
|
+
| 'iu'
|
|
287
|
+
/** Javanese. */
|
|
288
|
+
| 'jv'
|
|
289
|
+
/** Kikuyu. */
|
|
290
|
+
| 'ki'
|
|
291
|
+
/** Kanuri. */
|
|
292
|
+
| 'kr'
|
|
293
|
+
/** Kashmiri. */
|
|
294
|
+
| 'ks'
|
|
295
|
+
/** Cornish. */
|
|
296
|
+
| 'kw'
|
|
297
|
+
/** Ganda. */
|
|
298
|
+
| 'lg'
|
|
299
|
+
/** Limburgish. */
|
|
300
|
+
| 'li'
|
|
301
|
+
/** Luba-Katanga. */
|
|
302
|
+
| 'lu'
|
|
303
|
+
/** Marshallese. */
|
|
304
|
+
| 'mh'
|
|
305
|
+
/** Nauru. */
|
|
306
|
+
| 'na'
|
|
307
|
+
/** Norwegian Bokmål. */
|
|
308
|
+
| 'nb'
|
|
309
|
+
/** North Ndebele. */
|
|
310
|
+
| 'nd'
|
|
311
|
+
/** Ndonga. */
|
|
312
|
+
| 'ng'
|
|
313
|
+
/** Norwegian Nynorsk. */
|
|
314
|
+
| 'nn'
|
|
315
|
+
/** South Ndebele. */
|
|
316
|
+
| 'nr'
|
|
317
|
+
/** Navajo. */
|
|
318
|
+
| 'nv'
|
|
319
|
+
/** Occitan. */
|
|
320
|
+
| 'oc'
|
|
321
|
+
/** Ojibwe. */
|
|
322
|
+
| 'oj'
|
|
323
|
+
/** Oromo. */
|
|
324
|
+
| 'om'
|
|
325
|
+
/** Odia. */
|
|
326
|
+
| 'or'
|
|
327
|
+
/** Ossetian. */
|
|
328
|
+
| 'os'
|
|
329
|
+
/** Punjabi. */
|
|
330
|
+
| 'pa'
|
|
331
|
+
/** Pali. */
|
|
332
|
+
| 'pi'
|
|
333
|
+
/** Romansh. */
|
|
334
|
+
| 'rm'
|
|
335
|
+
/** Kirundi. */
|
|
336
|
+
| 'rn'
|
|
337
|
+
/** Kinyarwanda. */
|
|
338
|
+
| 'rw'
|
|
339
|
+
/** Sanskrit. */
|
|
340
|
+
| 'sa'
|
|
341
|
+
/** Sardinian. */
|
|
342
|
+
| 'sc'
|
|
343
|
+
/** Sango. */
|
|
344
|
+
| 'sg'
|
|
345
|
+
/** Swati. */
|
|
346
|
+
| 'ss'
|
|
347
|
+
/** Southern Sotho. */
|
|
348
|
+
| 'st'
|
|
349
|
+
/** Tigrinya. */
|
|
350
|
+
| 'ti'
|
|
351
|
+
/** Tswana. */
|
|
352
|
+
| 'tn'
|
|
353
|
+
/** Tongan. */
|
|
354
|
+
| 'to'
|
|
355
|
+
/** Tsonga. */
|
|
356
|
+
| 'ts'
|
|
357
|
+
/** Tatar. */
|
|
358
|
+
| 'tt'
|
|
359
|
+
/** Twi. */
|
|
360
|
+
| 'tw'
|
|
361
|
+
/** Tahitian. */
|
|
362
|
+
| 'ty'
|
|
363
|
+
/** Venda. */
|
|
364
|
+
| 've'
|
|
365
|
+
/** Volapük. */
|
|
366
|
+
| 'vo'
|
|
367
|
+
/** Walloon. */
|
|
368
|
+
| 'wa'
|
|
369
|
+
/** Wolof. */
|
|
370
|
+
| 'wo'
|
|
371
|
+
/** Zhuang. */
|
|
372
|
+
| 'za';
|
|
3
373
|
export type { ILocaleService, ILocaleServiceConfig, ILocaleDefinition } from '../definition';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/site-service-locale",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsc -b . && tsc --project tsconfig.cjs.json",
|
|
51
|
-
"lint": "
|
|
52
|
-
"test": "vitest --run &&
|
|
51
|
+
"lint": "pnpm --workspace-root run lint:package --package $npm_package_name",
|
|
52
|
+
"test": "vitest --run && pnpm run test-type-check",
|
|
53
53
|
"test-type-check": "echo 'validating typescript in test files' && tsc --project tsconfig.test.json && echo 'Finished validating typescript in test files successfully'"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
"falconPackageHash": "
|
|
80
|
+
"falconPackageHash": "7a91f009b4b61f3a2413bbf02183334bc781a46b6eb800a76bfe662d"
|
|
81
81
|
}
|
package/src/definition/index.ts
CHANGED
|
@@ -9,14 +9,56 @@ export type ILocaleServiceConfig = {
|
|
|
9
9
|
timeZone: string
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Reports the site's language, text direction, regional format, and time zone, so code running on the
|
|
14
|
+
* site can format and lay out content to match the site's settings.
|
|
15
|
+
*/
|
|
12
16
|
export interface ILocaleService {
|
|
17
|
+
/**
|
|
18
|
+
* Site's main language, as a 2-letter [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) code.
|
|
19
|
+
*
|
|
20
|
+
* On a site with [Wix Multilingual](https://support.wix.com/en/article/wix-multilingual-an-overview),
|
|
21
|
+
* this is the main language, even when a site visitor views the site in another language.
|
|
22
|
+
*
|
|
23
|
+
* The code has no region, so formatting dates and numbers with it alone loses regional conventions.
|
|
24
|
+
* Use `locale` for formatting.
|
|
25
|
+
*
|
|
26
|
+
* One value isn't an ISO 639-1 code: `jp`, a legacy code for Japanese. `Intl` expects `ja`.
|
|
27
|
+
*
|
|
28
|
+
* @exampleValue 'en'
|
|
29
|
+
*/
|
|
13
30
|
readonly language: Language
|
|
31
|
+
/**
|
|
32
|
+
* Text direction of the site's language.
|
|
33
|
+
*
|
|
34
|
+
* @exampleValue 'ltr'
|
|
35
|
+
*/
|
|
14
36
|
readonly direction: LanguageDirection
|
|
37
|
+
/**
|
|
38
|
+
* Site's regional format, as a [BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag).
|
|
39
|
+
*
|
|
40
|
+
* It's the site's setting, not the site visitor's browser language. Specify it as the locale for
|
|
41
|
+
* `Intl` date and number formatting, so dates and numbers follow the site's conventions for every
|
|
42
|
+
* site visitor.
|
|
43
|
+
*
|
|
44
|
+
* @exampleValue 'en-US'
|
|
45
|
+
*/
|
|
15
46
|
readonly locale: string
|
|
47
|
+
/**
|
|
48
|
+
* Site's time zone, as an [IANA time zone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
|
49
|
+
*
|
|
50
|
+
* It's the time zone set for the site's business, not the site visitor's time zone. Specify it as
|
|
51
|
+
* the `timeZone` option of `Intl.DateTimeFormat` to show times in the site's time zone.
|
|
52
|
+
*
|
|
53
|
+
* @exampleValue 'America/New_York'
|
|
54
|
+
*/
|
|
16
55
|
readonly timeZone: string
|
|
56
|
+
/** @internal Host-only. Replaces config values when the host's state changes. */
|
|
17
57
|
_updateConfig: (config: Partial<ILocaleServiceConfig>) => void
|
|
18
58
|
}
|
|
19
59
|
|
|
60
|
+
/** Definition of the Locale service, used to resolve it from the services manager. */
|
|
20
61
|
export type ILocaleDefinition = ServiceDefinition<ILocaleService, ILocaleServiceConfig>
|
|
21
62
|
|
|
63
|
+
/** Definition of the Locale service. Specify it in `useService()` or `servicesManager.getService()`. */
|
|
22
64
|
export const LocaleDefinition = defineService<ILocaleService, ILocaleServiceConfig>('@wix/site-service-locale')
|
package/src/types/index.ts
CHANGED
|
@@ -1,187 +1,375 @@
|
|
|
1
|
-
|
|
1
|
+
/** Text direction of a language, either left to right or right to left. */
|
|
2
|
+
export type LanguageDirection =
|
|
3
|
+
/** Left to right. */
|
|
4
|
+
| 'ltr'
|
|
5
|
+
/** Right to left. */
|
|
6
|
+
| 'rtl'
|
|
2
7
|
|
|
8
|
+
/** 2-letter language code. */
|
|
3
9
|
export type Language =
|
|
10
|
+
/** Persian. */
|
|
4
11
|
| 'fa'
|
|
12
|
+
/** Faroese. */
|
|
5
13
|
| 'fo'
|
|
14
|
+
/** Pashto. */
|
|
6
15
|
| 'ps'
|
|
16
|
+
/** Albanian. */
|
|
7
17
|
| 'sq'
|
|
18
|
+
/** Armenian. */
|
|
8
19
|
| 'hy'
|
|
20
|
+
/** Bengali. */
|
|
9
21
|
| 'bn'
|
|
22
|
+
/** Belarusian. */
|
|
10
23
|
| 'be'
|
|
24
|
+
/** Yoruba. */
|
|
11
25
|
| 'yo'
|
|
26
|
+
/** Bosnian. */
|
|
12
27
|
| 'bs'
|
|
28
|
+
/** Portuguese. */
|
|
13
29
|
| 'pt'
|
|
30
|
+
/** Bulgarian. */
|
|
14
31
|
| 'bg'
|
|
32
|
+
/** Khmer. */
|
|
15
33
|
| 'km'
|
|
34
|
+
/** Chinese. */
|
|
16
35
|
| 'zh'
|
|
36
|
+
/** Croatian. */
|
|
17
37
|
| 'hr'
|
|
38
|
+
/** Danish. */
|
|
18
39
|
| 'da'
|
|
40
|
+
/** Estonian. */
|
|
19
41
|
| 'et'
|
|
42
|
+
/** Fijian. */
|
|
20
43
|
| 'fj'
|
|
44
|
+
/** Finnish. */
|
|
21
45
|
| 'fi'
|
|
46
|
+
/** French. */
|
|
22
47
|
| 'fr'
|
|
48
|
+
/** German. */
|
|
23
49
|
| 'de'
|
|
50
|
+
/** Greek. */
|
|
24
51
|
| 'el'
|
|
52
|
+
/** Haitian Creole. */
|
|
25
53
|
| 'ht'
|
|
54
|
+
/** Hungarian. */
|
|
26
55
|
| 'hu'
|
|
56
|
+
/** Icelandic. */
|
|
27
57
|
| 'is'
|
|
58
|
+
/** Gujarati. */
|
|
28
59
|
| 'gu'
|
|
60
|
+
/** Hindi. */
|
|
29
61
|
| 'hi'
|
|
62
|
+
/** Kalaallisut. */
|
|
30
63
|
| 'kl'
|
|
64
|
+
/** Kannada. */
|
|
31
65
|
| 'kn'
|
|
66
|
+
/** Malayalam. */
|
|
32
67
|
| 'ml'
|
|
68
|
+
/** Sindhi. */
|
|
33
69
|
| 'sd'
|
|
70
|
+
/** Tamil. */
|
|
34
71
|
| 'ta'
|
|
72
|
+
/** Telugu. */
|
|
35
73
|
| 'te'
|
|
74
|
+
/** Indonesian. */
|
|
36
75
|
| 'id'
|
|
76
|
+
/** Sundanese. */
|
|
37
77
|
| 'su'
|
|
78
|
+
/** Kurdish. */
|
|
38
79
|
| 'ku'
|
|
80
|
+
/** Irish. */
|
|
39
81
|
| 'ga'
|
|
82
|
+
/** Galician. */
|
|
40
83
|
| 'gl'
|
|
84
|
+
/** Hebrew. */
|
|
41
85
|
| 'he'
|
|
86
|
+
/** Yiddish. */
|
|
42
87
|
| 'yi'
|
|
88
|
+
/** Corsican. */
|
|
43
89
|
| 'co'
|
|
90
|
+
/** Italian. */
|
|
44
91
|
| 'it'
|
|
92
|
+
/** Latin. */
|
|
45
93
|
| 'la'
|
|
94
|
+
/** Luxembourgish. */
|
|
46
95
|
| 'lb'
|
|
96
|
+
/** Japanese. */
|
|
47
97
|
| 'ja'
|
|
98
|
+
/** Japanese, as a legacy code. The ISO 639-1 code is `ja`. */
|
|
48
99
|
| 'jp'
|
|
100
|
+
/** Kazakh. */
|
|
49
101
|
| 'kk'
|
|
102
|
+
/** Swahili. */
|
|
50
103
|
| 'sw'
|
|
104
|
+
/** Lingala. */
|
|
51
105
|
| 'ln'
|
|
106
|
+
/** Lao. */
|
|
52
107
|
| 'lo'
|
|
108
|
+
/** Latvian. */
|
|
53
109
|
| 'lv'
|
|
110
|
+
/** Lithuanian. */
|
|
54
111
|
| 'lt'
|
|
112
|
+
/** Maori. */
|
|
55
113
|
| 'mi'
|
|
114
|
+
/** Macedonian. */
|
|
56
115
|
| 'mk'
|
|
116
|
+
/** Malagasy. */
|
|
57
117
|
| 'mg'
|
|
118
|
+
/** Marathi. */
|
|
58
119
|
| 'mr'
|
|
120
|
+
/** Malay. */
|
|
59
121
|
| 'ms'
|
|
122
|
+
/** Maltese. */
|
|
60
123
|
| 'mt'
|
|
124
|
+
/** Burmese. */
|
|
61
125
|
| 'my'
|
|
126
|
+
/** Mongolian. */
|
|
62
127
|
| 'mn'
|
|
128
|
+
/** Nepali. */
|
|
63
129
|
| 'ne'
|
|
130
|
+
/** Hausa. */
|
|
64
131
|
| 'ha'
|
|
132
|
+
/** Igbo. */
|
|
65
133
|
| 'ig'
|
|
134
|
+
/** Norwegian. */
|
|
66
135
|
| 'no'
|
|
136
|
+
/** Tagalog. */
|
|
67
137
|
| 'tl'
|
|
138
|
+
/** Polish. */
|
|
68
139
|
| 'pl'
|
|
140
|
+
/** Romanian. */
|
|
69
141
|
| 'ro'
|
|
142
|
+
/** Russian. */
|
|
70
143
|
| 'ru'
|
|
144
|
+
/** Northern Sami. */
|
|
71
145
|
| 'se'
|
|
146
|
+
/** Samoan. */
|
|
72
147
|
| 'sm'
|
|
148
|
+
/** Serbian. */
|
|
73
149
|
| 'sr'
|
|
150
|
+
/** Slovak. */
|
|
74
151
|
| 'sk'
|
|
152
|
+
/** Sinhala. */
|
|
75
153
|
| 'si'
|
|
154
|
+
/** Slovenian. */
|
|
76
155
|
| 'sl'
|
|
156
|
+
/** Somali. */
|
|
77
157
|
| 'so'
|
|
158
|
+
/** Afrikaans. */
|
|
78
159
|
| 'af'
|
|
160
|
+
/** Xhosa. */
|
|
79
161
|
| 'xh'
|
|
162
|
+
/** Zulu. */
|
|
80
163
|
| 'zu'
|
|
164
|
+
/** Korean. */
|
|
81
165
|
| 'ko'
|
|
166
|
+
/** Basque. */
|
|
82
167
|
| 'eu'
|
|
168
|
+
/** Catalan. */
|
|
83
169
|
| 'ca'
|
|
170
|
+
/** Spanish. */
|
|
84
171
|
| 'es'
|
|
172
|
+
/** Swedish. */
|
|
85
173
|
| 'sv'
|
|
174
|
+
/** Tajik. */
|
|
86
175
|
| 'tg'
|
|
176
|
+
/** Thai. */
|
|
87
177
|
| 'th'
|
|
178
|
+
/** Turkish. */
|
|
88
179
|
| 'tr'
|
|
180
|
+
/** Uyghur. */
|
|
89
181
|
| 'ug'
|
|
182
|
+
/** Ukrainian. */
|
|
90
183
|
| 'uk'
|
|
184
|
+
/** Welsh. */
|
|
91
185
|
| 'cy'
|
|
186
|
+
/** English. */
|
|
92
187
|
| 'en'
|
|
188
|
+
/** Uzbek. */
|
|
93
189
|
| 'uz'
|
|
190
|
+
/** Vietnamese. */
|
|
94
191
|
| 'vi'
|
|
192
|
+
/** Chichewa. */
|
|
95
193
|
| 'ny'
|
|
194
|
+
/** Shona. */
|
|
96
195
|
| 'sn'
|
|
196
|
+
/** Azerbaijani. */
|
|
97
197
|
| 'az'
|
|
198
|
+
/** Czech. */
|
|
98
199
|
| 'cs'
|
|
200
|
+
/** Amharic. */
|
|
99
201
|
| 'am'
|
|
202
|
+
/** Georgian. */
|
|
100
203
|
| 'ka'
|
|
204
|
+
/** Kyrgyz. */
|
|
101
205
|
| 'ky'
|
|
206
|
+
/** Dutch. */
|
|
102
207
|
| 'nl'
|
|
208
|
+
/** Urdu. */
|
|
103
209
|
| 'ur'
|
|
210
|
+
/** Arabic. */
|
|
104
211
|
| 'ar'
|
|
212
|
+
/** Quechua. */
|
|
105
213
|
| 'qu'
|
|
214
|
+
/** Turkmen. */
|
|
106
215
|
| 'tk'
|
|
216
|
+
/** Afar. */
|
|
107
217
|
| 'aa'
|
|
218
|
+
/** Abkhazian. */
|
|
108
219
|
| 'ab'
|
|
220
|
+
/** Avestan. */
|
|
109
221
|
| 'ae'
|
|
222
|
+
/** Akan. */
|
|
110
223
|
| 'ak'
|
|
224
|
+
/** Aragonese. */
|
|
111
225
|
| 'an'
|
|
226
|
+
/** Assamese. */
|
|
112
227
|
| 'as'
|
|
228
|
+
/** Avaric. */
|
|
113
229
|
| 'av'
|
|
230
|
+
/** Aymara. */
|
|
114
231
|
| 'ay'
|
|
232
|
+
/** Bashkir. */
|
|
115
233
|
| 'ba'
|
|
234
|
+
/** Bihari. */
|
|
116
235
|
| 'bh'
|
|
236
|
+
/** Bislama. */
|
|
117
237
|
| 'bi'
|
|
238
|
+
/** Bambara. */
|
|
118
239
|
| 'bm'
|
|
240
|
+
/** Tibetan. */
|
|
119
241
|
| 'bo'
|
|
242
|
+
/** Breton. */
|
|
120
243
|
| 'br'
|
|
244
|
+
/** Chechen. */
|
|
121
245
|
| 'ce'
|
|
246
|
+
/** Chamorro. */
|
|
122
247
|
| 'ch'
|
|
248
|
+
/** Cree. */
|
|
123
249
|
| 'cr'
|
|
250
|
+
/** Church Slavonic. */
|
|
124
251
|
| 'cu'
|
|
252
|
+
/** Chuvash. */
|
|
125
253
|
| 'cv'
|
|
254
|
+
/** Divehi. */
|
|
126
255
|
| 'dv'
|
|
256
|
+
/** Dzongkha. */
|
|
127
257
|
| 'dz'
|
|
258
|
+
/** Ewe. */
|
|
128
259
|
| 'ee'
|
|
260
|
+
/** Esperanto. */
|
|
129
261
|
| 'eo'
|
|
262
|
+
/** Fula. */
|
|
130
263
|
| 'ff'
|
|
264
|
+
/** Western Frisian. */
|
|
131
265
|
| 'fy'
|
|
266
|
+
/** Scottish Gaelic. */
|
|
132
267
|
| 'gd'
|
|
268
|
+
/** Guarani. */
|
|
133
269
|
| 'gn'
|
|
270
|
+
/** Manx. */
|
|
134
271
|
| 'gv'
|
|
272
|
+
/** Hiri Motu. */
|
|
135
273
|
| 'ho'
|
|
274
|
+
/** Herero. */
|
|
136
275
|
| 'hz'
|
|
276
|
+
/** Interlingua. */
|
|
137
277
|
| 'ia'
|
|
278
|
+
/** Interlingue. */
|
|
138
279
|
| 'ie'
|
|
280
|
+
/** Sichuan Yi. */
|
|
139
281
|
| 'ii'
|
|
282
|
+
/** Inupiaq. */
|
|
140
283
|
| 'ik'
|
|
284
|
+
/** Ido. */
|
|
141
285
|
| 'io'
|
|
286
|
+
/** Inuktitut. */
|
|
142
287
|
| 'iu'
|
|
288
|
+
/** Javanese. */
|
|
143
289
|
| 'jv'
|
|
290
|
+
/** Kikuyu. */
|
|
144
291
|
| 'ki'
|
|
292
|
+
/** Kanuri. */
|
|
145
293
|
| 'kr'
|
|
294
|
+
/** Kashmiri. */
|
|
146
295
|
| 'ks'
|
|
296
|
+
/** Cornish. */
|
|
147
297
|
| 'kw'
|
|
298
|
+
/** Ganda. */
|
|
148
299
|
| 'lg'
|
|
300
|
+
/** Limburgish. */
|
|
149
301
|
| 'li'
|
|
302
|
+
/** Luba-Katanga. */
|
|
150
303
|
| 'lu'
|
|
304
|
+
/** Marshallese. */
|
|
151
305
|
| 'mh'
|
|
306
|
+
/** Nauru. */
|
|
152
307
|
| 'na'
|
|
308
|
+
/** Norwegian Bokmål. */
|
|
153
309
|
| 'nb'
|
|
310
|
+
/** North Ndebele. */
|
|
154
311
|
| 'nd'
|
|
312
|
+
/** Ndonga. */
|
|
155
313
|
| 'ng'
|
|
314
|
+
/** Norwegian Nynorsk. */
|
|
156
315
|
| 'nn'
|
|
316
|
+
/** South Ndebele. */
|
|
157
317
|
| 'nr'
|
|
318
|
+
/** Navajo. */
|
|
158
319
|
| 'nv'
|
|
320
|
+
/** Occitan. */
|
|
159
321
|
| 'oc'
|
|
322
|
+
/** Ojibwe. */
|
|
160
323
|
| 'oj'
|
|
324
|
+
/** Oromo. */
|
|
161
325
|
| 'om'
|
|
326
|
+
/** Odia. */
|
|
162
327
|
| 'or'
|
|
328
|
+
/** Ossetian. */
|
|
163
329
|
| 'os'
|
|
330
|
+
/** Punjabi. */
|
|
164
331
|
| 'pa'
|
|
332
|
+
/** Pali. */
|
|
165
333
|
| 'pi'
|
|
334
|
+
/** Romansh. */
|
|
166
335
|
| 'rm'
|
|
336
|
+
/** Kirundi. */
|
|
167
337
|
| 'rn'
|
|
338
|
+
/** Kinyarwanda. */
|
|
168
339
|
| 'rw'
|
|
340
|
+
/** Sanskrit. */
|
|
169
341
|
| 'sa'
|
|
342
|
+
/** Sardinian. */
|
|
170
343
|
| 'sc'
|
|
344
|
+
/** Sango. */
|
|
171
345
|
| 'sg'
|
|
346
|
+
/** Swati. */
|
|
172
347
|
| 'ss'
|
|
348
|
+
/** Southern Sotho. */
|
|
173
349
|
| 'st'
|
|
350
|
+
/** Tigrinya. */
|
|
174
351
|
| 'ti'
|
|
352
|
+
/** Tswana. */
|
|
175
353
|
| 'tn'
|
|
354
|
+
/** Tongan. */
|
|
176
355
|
| 'to'
|
|
356
|
+
/** Tsonga. */
|
|
177
357
|
| 'ts'
|
|
358
|
+
/** Tatar. */
|
|
178
359
|
| 'tt'
|
|
360
|
+
/** Twi. */
|
|
179
361
|
| 'tw'
|
|
362
|
+
/** Tahitian. */
|
|
180
363
|
| 'ty'
|
|
364
|
+
/** Venda. */
|
|
181
365
|
| 've'
|
|
366
|
+
/** Volapük. */
|
|
182
367
|
| 'vo'
|
|
368
|
+
/** Walloon. */
|
|
183
369
|
| 'wa'
|
|
370
|
+
/** Wolof. */
|
|
184
371
|
| 'wo'
|
|
372
|
+
/** Zhuang. */
|
|
185
373
|
| 'za'
|
|
186
374
|
|
|
187
375
|
export type { ILocaleService, ILocaleServiceConfig, ILocaleDefinition } from '../definition'
|