@genesislcap/foundation-i18n 14.129.0 → 14.130.0

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.
@@ -0,0 +1,21 @@
1
+ import type { InitOptions } from 'i18next';
2
+ /**
3
+ * I18nextConfig DI interface.
4
+ * @public
5
+ */
6
+ export interface I18nextConfig extends InitOptions {
7
+ }
8
+ /**
9
+ * Default I18nextConfig DI implementation.
10
+ * @public
11
+ */
12
+ export declare const defaultI18nextConfig: I18nextConfig;
13
+ /**
14
+ * I18nextConfig DI key.
15
+ *
16
+ * @internal
17
+ * @privateRemarks
18
+ * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
19
+ */
20
+ export declare const I18nextConfig: import("@microsoft/fast-foundation").InterfaceSymbol<I18nextConfig>;
21
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/i18n/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,WAAW;CAAG;AAErD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAGlC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,qEAEzB,CAAC"}
@@ -1,18 +1,33 @@
1
1
  import type { InitOptions, Callback, TFunction, TOptions, StringMap } from 'i18next';
2
+ import { I18nextConfig } from './config';
2
3
  /**
3
4
  * The I18next interface is used to provide i18n functionality to components.
4
5
  * @alpha
5
6
  */
6
7
  export interface I18next {
8
+ readonly config: I18nextConfig;
7
9
  options: InitOptions;
8
10
  language: string;
9
11
  init(options: InitOptions, callback?: Callback): Promise<TFunction>;
10
12
  t(key: string | string[], options?: string | TOptions<StringMap>): string;
11
13
  changeLanguageTo(language: string): void;
12
14
  }
15
+ /**
16
+ * The default implementation for the I18next interface.
17
+ * @public
18
+ */
19
+ export declare class DefaultI18next implements I18next {
20
+ config: I18nextConfig;
21
+ language: string;
22
+ options: InitOptions;
23
+ constructor();
24
+ init(options: InitOptions, callback?: Callback): Promise<TFunction>;
25
+ t(key: string | string[], options?: string | TOptions<StringMap>): string;
26
+ changeLanguageTo(language: string): void;
27
+ }
13
28
  /**
14
29
  * The DI token for the i18n interface.
15
30
  * @internal
16
31
  */
17
32
  export declare const I18next: import("@microsoft/fast-foundation").InterfaceSymbol<I18next>;
18
- //# sourceMappingURL=i18n.service.d.ts.map
33
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/i18n/i18n.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IAC1E,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,qBAAa,cAAe,YAAW,OAAO;IAC7B,MAAM,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,CAAC;;IAMjC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAMnE,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM;IAIzE,gBAAgB,CAAC,QAAQ,EAAE,MAAM;CAGlC;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,+DAAkE,CAAC"}
@@ -1,2 +1,3 @@
1
- export * from './i18n.service';
1
+ export * from './config';
2
+ export * from './i18n';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { DI } from '@microsoft/fast-foundation';
2
+ /**
3
+ * Default I18nextConfig DI implementation.
4
+ * @public
5
+ */
6
+ export const defaultI18nextConfig = {
7
+ lng: 'en',
8
+ resources: {},
9
+ };
10
+ /**
11
+ * I18nextConfig DI key.
12
+ *
13
+ * @internal
14
+ * @privateRemarks
15
+ * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
16
+ */
17
+ export const I18nextConfig = DI.createInterface((x) => x.instance(defaultI18nextConfig));
@@ -2,11 +2,15 @@ import { __decorate } from "tslib";
2
2
  import { observable } from '@microsoft/fast-element';
3
3
  import { DI } from '@microsoft/fast-foundation';
4
4
  import i18next from 'i18next';
5
+ import { I18nextConfig } from './config';
5
6
  /**
6
7
  * The default implementation for the I18next interface.
7
8
  * @public
8
9
  */
9
- class DefaultI18next {
10
+ export class DefaultI18next {
11
+ constructor() {
12
+ this.init(this.config);
13
+ }
10
14
  init(options, callback) {
11
15
  this.options = options;
12
16
  this.language = options.lng;
@@ -19,6 +23,9 @@ class DefaultI18next {
19
23
  this.language = language;
20
24
  }
21
25
  }
26
+ __decorate([
27
+ I18nextConfig
28
+ ], DefaultI18next.prototype, "config", void 0);
22
29
  __decorate([
23
30
  observable
24
31
  ], DefaultI18next.prototype, "language", void 0);
@@ -1 +1,2 @@
1
- export * from './i18n.service';
1
+ export * from './config';
2
+ export * from './i18n';
@@ -171,7 +171,413 @@
171
171
  "canonicalReference": "@genesislcap/foundation-i18n!",
172
172
  "name": "",
173
173
  "preserveMemberOrder": false,
174
- "members": []
174
+ "members": [
175
+ {
176
+ "kind": "Class",
177
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next:class",
178
+ "docComment": "/**\n * The default implementation for the I18next interface.\n *\n * @public\n */\n",
179
+ "excerptTokens": [
180
+ {
181
+ "kind": "Content",
182
+ "text": "export declare class DefaultI18next implements "
183
+ },
184
+ {
185
+ "kind": "Reference",
186
+ "text": "I18next",
187
+ "canonicalReference": "@genesislcap/foundation-i18n!I18next:interface"
188
+ },
189
+ {
190
+ "kind": "Content",
191
+ "text": " "
192
+ }
193
+ ],
194
+ "fileUrlPath": "src/i18n/i18n.ts",
195
+ "releaseTag": "Public",
196
+ "isAbstract": false,
197
+ "name": "DefaultI18next",
198
+ "preserveMemberOrder": false,
199
+ "members": [
200
+ {
201
+ "kind": "Constructor",
202
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next:constructor(1)",
203
+ "docComment": "/**\n * Constructs a new instance of the `DefaultI18next` class\n */\n",
204
+ "excerptTokens": [
205
+ {
206
+ "kind": "Content",
207
+ "text": "constructor();"
208
+ }
209
+ ],
210
+ "releaseTag": "Public",
211
+ "isProtected": false,
212
+ "overloadIndex": 1,
213
+ "parameters": []
214
+ },
215
+ {
216
+ "kind": "Method",
217
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#changeLanguageTo:member(1)",
218
+ "docComment": "",
219
+ "excerptTokens": [
220
+ {
221
+ "kind": "Content",
222
+ "text": "changeLanguageTo(language: "
223
+ },
224
+ {
225
+ "kind": "Content",
226
+ "text": "string"
227
+ },
228
+ {
229
+ "kind": "Content",
230
+ "text": "): "
231
+ },
232
+ {
233
+ "kind": "Content",
234
+ "text": "void"
235
+ },
236
+ {
237
+ "kind": "Content",
238
+ "text": ";"
239
+ }
240
+ ],
241
+ "isStatic": false,
242
+ "returnTypeTokenRange": {
243
+ "startIndex": 3,
244
+ "endIndex": 4
245
+ },
246
+ "releaseTag": "Public",
247
+ "isProtected": false,
248
+ "overloadIndex": 1,
249
+ "parameters": [
250
+ {
251
+ "parameterName": "language",
252
+ "parameterTypeTokenRange": {
253
+ "startIndex": 1,
254
+ "endIndex": 2
255
+ },
256
+ "isOptional": false
257
+ }
258
+ ],
259
+ "isOptional": false,
260
+ "isAbstract": false,
261
+ "name": "changeLanguageTo"
262
+ },
263
+ {
264
+ "kind": "Property",
265
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#config:member",
266
+ "docComment": "",
267
+ "excerptTokens": [
268
+ {
269
+ "kind": "Content",
270
+ "text": "config: "
271
+ },
272
+ {
273
+ "kind": "Reference",
274
+ "text": "I18nextConfig",
275
+ "canonicalReference": "@genesislcap/foundation-i18n!I18nextConfig:interface"
276
+ },
277
+ {
278
+ "kind": "Content",
279
+ "text": ";"
280
+ }
281
+ ],
282
+ "isReadonly": false,
283
+ "isOptional": false,
284
+ "releaseTag": "Public",
285
+ "name": "config",
286
+ "propertyTypeTokenRange": {
287
+ "startIndex": 1,
288
+ "endIndex": 2
289
+ },
290
+ "isStatic": false,
291
+ "isProtected": false,
292
+ "isAbstract": false
293
+ },
294
+ {
295
+ "kind": "Method",
296
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#init:member(1)",
297
+ "docComment": "",
298
+ "excerptTokens": [
299
+ {
300
+ "kind": "Content",
301
+ "text": "init(options: "
302
+ },
303
+ {
304
+ "kind": "Reference",
305
+ "text": "InitOptions",
306
+ "canonicalReference": "i18next!InitOptions:interface"
307
+ },
308
+ {
309
+ "kind": "Content",
310
+ "text": ", callback?: "
311
+ },
312
+ {
313
+ "kind": "Reference",
314
+ "text": "Callback",
315
+ "canonicalReference": "i18next!Callback:type"
316
+ },
317
+ {
318
+ "kind": "Content",
319
+ "text": "): "
320
+ },
321
+ {
322
+ "kind": "Reference",
323
+ "text": "Promise",
324
+ "canonicalReference": "!Promise:interface"
325
+ },
326
+ {
327
+ "kind": "Content",
328
+ "text": "<"
329
+ },
330
+ {
331
+ "kind": "Reference",
332
+ "text": "TFunction",
333
+ "canonicalReference": "i18next!TFunction:interface"
334
+ },
335
+ {
336
+ "kind": "Content",
337
+ "text": ">"
338
+ },
339
+ {
340
+ "kind": "Content",
341
+ "text": ";"
342
+ }
343
+ ],
344
+ "isStatic": false,
345
+ "returnTypeTokenRange": {
346
+ "startIndex": 5,
347
+ "endIndex": 9
348
+ },
349
+ "releaseTag": "Public",
350
+ "isProtected": false,
351
+ "overloadIndex": 1,
352
+ "parameters": [
353
+ {
354
+ "parameterName": "options",
355
+ "parameterTypeTokenRange": {
356
+ "startIndex": 1,
357
+ "endIndex": 2
358
+ },
359
+ "isOptional": false
360
+ },
361
+ {
362
+ "parameterName": "callback",
363
+ "parameterTypeTokenRange": {
364
+ "startIndex": 3,
365
+ "endIndex": 4
366
+ },
367
+ "isOptional": true
368
+ }
369
+ ],
370
+ "isOptional": false,
371
+ "isAbstract": false,
372
+ "name": "init"
373
+ },
374
+ {
375
+ "kind": "Property",
376
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#language:member",
377
+ "docComment": "",
378
+ "excerptTokens": [
379
+ {
380
+ "kind": "Content",
381
+ "text": "language: "
382
+ },
383
+ {
384
+ "kind": "Content",
385
+ "text": "string"
386
+ },
387
+ {
388
+ "kind": "Content",
389
+ "text": ";"
390
+ }
391
+ ],
392
+ "isReadonly": false,
393
+ "isOptional": false,
394
+ "releaseTag": "Public",
395
+ "name": "language",
396
+ "propertyTypeTokenRange": {
397
+ "startIndex": 1,
398
+ "endIndex": 2
399
+ },
400
+ "isStatic": false,
401
+ "isProtected": false,
402
+ "isAbstract": false
403
+ },
404
+ {
405
+ "kind": "Property",
406
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#options:member",
407
+ "docComment": "",
408
+ "excerptTokens": [
409
+ {
410
+ "kind": "Content",
411
+ "text": "options: "
412
+ },
413
+ {
414
+ "kind": "Reference",
415
+ "text": "InitOptions",
416
+ "canonicalReference": "i18next!InitOptions:interface"
417
+ },
418
+ {
419
+ "kind": "Content",
420
+ "text": ";"
421
+ }
422
+ ],
423
+ "isReadonly": false,
424
+ "isOptional": false,
425
+ "releaseTag": "Public",
426
+ "name": "options",
427
+ "propertyTypeTokenRange": {
428
+ "startIndex": 1,
429
+ "endIndex": 2
430
+ },
431
+ "isStatic": false,
432
+ "isProtected": false,
433
+ "isAbstract": false
434
+ },
435
+ {
436
+ "kind": "Method",
437
+ "canonicalReference": "@genesislcap/foundation-i18n!DefaultI18next#t:member(1)",
438
+ "docComment": "",
439
+ "excerptTokens": [
440
+ {
441
+ "kind": "Content",
442
+ "text": "t(key: "
443
+ },
444
+ {
445
+ "kind": "Content",
446
+ "text": "string | string[]"
447
+ },
448
+ {
449
+ "kind": "Content",
450
+ "text": ", options?: "
451
+ },
452
+ {
453
+ "kind": "Content",
454
+ "text": "string | "
455
+ },
456
+ {
457
+ "kind": "Reference",
458
+ "text": "TOptions",
459
+ "canonicalReference": "i18next!TOptions:type"
460
+ },
461
+ {
462
+ "kind": "Content",
463
+ "text": "<"
464
+ },
465
+ {
466
+ "kind": "Reference",
467
+ "text": "StringMap",
468
+ "canonicalReference": "i18next!StringMap:type"
469
+ },
470
+ {
471
+ "kind": "Content",
472
+ "text": ">"
473
+ },
474
+ {
475
+ "kind": "Content",
476
+ "text": "): "
477
+ },
478
+ {
479
+ "kind": "Content",
480
+ "text": "string"
481
+ },
482
+ {
483
+ "kind": "Content",
484
+ "text": ";"
485
+ }
486
+ ],
487
+ "isStatic": false,
488
+ "returnTypeTokenRange": {
489
+ "startIndex": 9,
490
+ "endIndex": 10
491
+ },
492
+ "releaseTag": "Public",
493
+ "isProtected": false,
494
+ "overloadIndex": 1,
495
+ "parameters": [
496
+ {
497
+ "parameterName": "key",
498
+ "parameterTypeTokenRange": {
499
+ "startIndex": 1,
500
+ "endIndex": 2
501
+ },
502
+ "isOptional": false
503
+ },
504
+ {
505
+ "parameterName": "options",
506
+ "parameterTypeTokenRange": {
507
+ "startIndex": 3,
508
+ "endIndex": 8
509
+ },
510
+ "isOptional": true
511
+ }
512
+ ],
513
+ "isOptional": false,
514
+ "isAbstract": false,
515
+ "name": "t"
516
+ }
517
+ ],
518
+ "implementsTokenRanges": [
519
+ {
520
+ "startIndex": 1,
521
+ "endIndex": 2
522
+ }
523
+ ]
524
+ },
525
+ {
526
+ "kind": "Variable",
527
+ "canonicalReference": "@genesislcap/foundation-i18n!defaultI18nextConfig:var",
528
+ "docComment": "/**\n * Default I18nextConfig DI implementation.\n *\n * @public\n */\n",
529
+ "excerptTokens": [
530
+ {
531
+ "kind": "Content",
532
+ "text": "defaultI18nextConfig: "
533
+ },
534
+ {
535
+ "kind": "Reference",
536
+ "text": "I18nextConfig",
537
+ "canonicalReference": "@genesislcap/foundation-i18n!I18nextConfig:interface"
538
+ }
539
+ ],
540
+ "fileUrlPath": "src/i18n/config.ts",
541
+ "isReadonly": true,
542
+ "releaseTag": "Public",
543
+ "name": "defaultI18nextConfig",
544
+ "variableTypeTokenRange": {
545
+ "startIndex": 1,
546
+ "endIndex": 2
547
+ }
548
+ },
549
+ {
550
+ "kind": "Interface",
551
+ "canonicalReference": "@genesislcap/foundation-i18n!I18nextConfig:interface",
552
+ "docComment": "/**\n * I18nextConfig DI interface.\n *\n * @public\n */\n",
553
+ "excerptTokens": [
554
+ {
555
+ "kind": "Content",
556
+ "text": "export interface I18nextConfig extends "
557
+ },
558
+ {
559
+ "kind": "Reference",
560
+ "text": "InitOptions",
561
+ "canonicalReference": "i18next!InitOptions:interface"
562
+ },
563
+ {
564
+ "kind": "Content",
565
+ "text": " "
566
+ }
567
+ ],
568
+ "fileUrlPath": "src/i18n/config.ts",
569
+ "releaseTag": "Public",
570
+ "name": "I18nextConfig",
571
+ "preserveMemberOrder": false,
572
+ "members": [],
573
+ "extendsTokenRanges": [
574
+ {
575
+ "startIndex": 1,
576
+ "endIndex": 2
577
+ }
578
+ ]
579
+ }
580
+ ]
175
581
  }
176
582
  ]
177
583
  }
@@ -6,11 +6,32 @@ import type { StringMap } from 'i18next';
6
6
  import type { TFunction } from 'i18next';
7
7
  import type { TOptions } from 'i18next';
8
8
 
9
+ /**
10
+ * The default implementation for the I18next interface.
11
+ * @public
12
+ */
13
+ export declare class DefaultI18next implements I18next {
14
+ config: I18nextConfig;
15
+ language: string;
16
+ options: InitOptions;
17
+ constructor();
18
+ init(options: InitOptions, callback?: Callback): Promise<TFunction>;
19
+ t(key: string | string[], options?: string | TOptions<StringMap>): string;
20
+ changeLanguageTo(language: string): void;
21
+ }
22
+
23
+ /**
24
+ * Default I18nextConfig DI implementation.
25
+ * @public
26
+ */
27
+ export declare const defaultI18nextConfig: I18nextConfig;
28
+
9
29
  /**
10
30
  * The I18next interface is used to provide i18n functionality to components.
11
31
  * @alpha
12
32
  */
13
33
  export declare interface I18next {
34
+ readonly config: I18nextConfig;
14
35
  options: InitOptions;
15
36
  language: string;
16
37
  init(options: InitOptions, callback?: Callback): Promise<TFunction>;
@@ -26,4 +47,20 @@ export declare const I18next: InterfaceSymbol<I18next>;
26
47
 
27
48
  export { i18next }
28
49
 
50
+ /**
51
+ * I18nextConfig DI interface.
52
+ * @public
53
+ */
54
+ export declare interface I18nextConfig extends InitOptions {
55
+ }
56
+
57
+ /**
58
+ * I18nextConfig DI key.
59
+ *
60
+ * @internal
61
+ * @privateRemarks
62
+ * Marked as internal to stop api-extractor becoming confused cross-linking tokens with the same name.
63
+ */
64
+ export declare const I18nextConfig: InterfaceSymbol<I18nextConfig>;
65
+
29
66
  export { }
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [(constructor)](./foundation-i18n.defaulti18next._constructor_.md)
4
+
5
+ ## DefaultI18next.(constructor)
6
+
7
+ Constructs a new instance of the `DefaultI18next` class
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ constructor();
13
+ ```
@@ -0,0 +1,22 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [changeLanguageTo](./foundation-i18n.defaulti18next.changelanguageto.md)
4
+
5
+ ## DefaultI18next.changeLanguageTo() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ changeLanguageTo(language: string): void;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | language | string | |
18
+
19
+ **Returns:**
20
+
21
+ void
22
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [config](./foundation-i18n.defaulti18next.config.md)
4
+
5
+ ## DefaultI18next.config property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ config: I18nextConfig;
11
+ ```
@@ -0,0 +1,23 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [init](./foundation-i18n.defaulti18next.init.md)
4
+
5
+ ## DefaultI18next.init() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ init(options: InitOptions, callback?: Callback): Promise<TFunction>;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | options | InitOptions | |
18
+ | callback | Callback | _(Optional)_ |
19
+
20
+ **Returns:**
21
+
22
+ Promise&lt;TFunction&gt;
23
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [language](./foundation-i18n.defaulti18next.language.md)
4
+
5
+ ## DefaultI18next.language property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ language: string;
11
+ ```
@@ -0,0 +1,37 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md)
4
+
5
+ ## DefaultI18next class
6
+
7
+ The default implementation for the I18next interface.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export declare class DefaultI18next implements I18next
13
+ ```
14
+ **Implements:** I18next
15
+
16
+ ## Constructors
17
+
18
+ | Constructor | Modifiers | Description |
19
+ | --- | --- | --- |
20
+ | [(constructor)()](./foundation-i18n.defaulti18next._constructor_.md) | | Constructs a new instance of the <code>DefaultI18next</code> class |
21
+
22
+ ## Properties
23
+
24
+ | Property | Modifiers | Type | Description |
25
+ | --- | --- | --- | --- |
26
+ | [config](./foundation-i18n.defaulti18next.config.md) | | [I18nextConfig](./foundation-i18n.i18nextconfig.md) | |
27
+ | [language](./foundation-i18n.defaulti18next.language.md) | | string | |
28
+ | [options](./foundation-i18n.defaulti18next.options.md) | | InitOptions | |
29
+
30
+ ## Methods
31
+
32
+ | Method | Modifiers | Description |
33
+ | --- | --- | --- |
34
+ | [changeLanguageTo(language)](./foundation-i18n.defaulti18next.changelanguageto.md) | | |
35
+ | [init(options, callback)](./foundation-i18n.defaulti18next.init.md) | | |
36
+ | [t(key, options)](./foundation-i18n.defaulti18next.t.md) | | |
37
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [options](./foundation-i18n.defaulti18next.options.md)
4
+
5
+ ## DefaultI18next.options property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ options: InitOptions;
11
+ ```
@@ -0,0 +1,23 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [DefaultI18next](./foundation-i18n.defaulti18next.md) &gt; [t](./foundation-i18n.defaulti18next.t.md)
4
+
5
+ ## DefaultI18next.t() method
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ t(key: string | string[], options?: string | TOptions<StringMap>): string;
11
+ ```
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | --- | --- | --- |
17
+ | key | string \| string\[\] | |
18
+ | options | string \| TOptions&lt;StringMap&gt; | _(Optional)_ |
19
+
20
+ **Returns:**
21
+
22
+ string
23
+
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [defaultI18nextConfig](./foundation-i18n.defaulti18nextconfig.md)
4
+
5
+ ## defaultI18nextConfig variable
6
+
7
+ Default I18nextConfig DI implementation.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ defaultI18nextConfig: I18nextConfig
13
+ ```
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-i18n](./foundation-i18n.md) &gt; [I18nextConfig](./foundation-i18n.i18nextconfig.md)
4
+
5
+ ## I18nextConfig interface
6
+
7
+ I18nextConfig DI interface.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export interface I18nextConfig extends InitOptions
13
+ ```
14
+ **Extends:** InitOptions
15
+
@@ -4,3 +4,21 @@
4
4
 
5
5
  ## foundation-i18n package
6
6
 
7
+ ## Classes
8
+
9
+ | Class | Description |
10
+ | --- | --- |
11
+ | [DefaultI18next](./foundation-i18n.defaulti18next.md) | The default implementation for the I18next interface. |
12
+
13
+ ## Interfaces
14
+
15
+ | Interface | Description |
16
+ | --- | --- |
17
+ | [I18nextConfig](./foundation-i18n.i18nextconfig.md) | I18nextConfig DI interface. |
18
+
19
+ ## Variables
20
+
21
+ | Variable | Description |
22
+ | --- | --- |
23
+ | [defaultI18nextConfig](./foundation-i18n.defaulti18nextconfig.md) | Default I18nextConfig DI implementation. |
24
+
@@ -12,6 +12,28 @@ import type { StringMap } from 'i18next';
12
12
  import type { TFunction } from 'i18next';
13
13
  import type { TOptions } from 'i18next';
14
14
 
15
+ // Warning: (ae-incompatible-release-tags) The symbol "DefaultI18next" is marked as @public, but its signature references "I18next" which is marked as @alpha
16
+ //
17
+ // @public
18
+ export class DefaultI18next implements I18next {
19
+ constructor();
20
+ // (undocumented)
21
+ changeLanguageTo(language: string): void;
22
+ // (undocumented)
23
+ config: I18nextConfig;
24
+ // (undocumented)
25
+ init(options: InitOptions, callback?: Callback): Promise<TFunction>;
26
+ // (undocumented)
27
+ language: string;
28
+ // (undocumented)
29
+ options: InitOptions;
30
+ // (undocumented)
31
+ t(key: string | string[], options?: string | TOptions<StringMap>): string;
32
+ }
33
+
34
+ // @public
35
+ export const defaultI18nextConfig: I18nextConfig;
36
+
15
37
  // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "I18next" because one of its declarations is marked as @internal
16
38
  //
17
39
  // @alpha
@@ -19,6 +41,8 @@ export interface I18next {
19
41
  // (undocumented)
20
42
  changeLanguageTo(language: string): void;
21
43
  // (undocumented)
44
+ readonly config: I18nextConfig;
45
+ // (undocumented)
22
46
  init(options: InitOptions, callback?: Callback): Promise<TFunction>;
23
47
  // (undocumented)
24
48
  language: string;
@@ -33,6 +57,15 @@ export const I18next: InterfaceSymbol<I18next>;
33
57
 
34
58
  export { i18next }
35
59
 
60
+ // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "I18nextConfig" because one of its declarations is marked as @internal
61
+ //
62
+ // @public
63
+ export interface I18nextConfig extends InitOptions {
64
+ }
65
+
66
+ // @internal
67
+ export const I18nextConfig: InterfaceSymbol<I18nextConfig>;
68
+
36
69
  // (No @packageDocumentation comment for this package)
37
70
 
38
71
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-i18n",
3
3
  "description": "Foundation components and services for Internationalization (i18n) support",
4
- "version": "14.129.0",
4
+ "version": "14.130.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -22,11 +22,11 @@
22
22
  "serve": "genx serve"
23
23
  },
24
24
  "devDependencies": {
25
- "@genesislcap/genx": "14.129.0",
25
+ "@genesislcap/genx": "14.130.0",
26
26
  "rimraf": "^3.0.2"
27
27
  },
28
28
  "dependencies": {
29
- "@genesislcap/foundation-logger": "14.129.0",
29
+ "@genesislcap/foundation-logger": "14.130.0",
30
30
  "@microsoft/fast-element": "^1.12.0",
31
31
  "@microsoft/fast-foundation": "^2.49.4",
32
32
  "i18next": "^20.3.0",
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "3c5fc48788499117b7acb540f96adb11bc4f05d3"
43
+ "gitHead": "71ae81e8e14cdc1564c23459c56db3b53b1f1109"
44
44
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.service.d.ts","sourceRoot":"","sources":["../../../src/i18n/i18n.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IACpE,CAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;IAC1E,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1C;AAyBD;;;GAGG;AACH,eAAO,MAAM,OAAO,+DAAkE,CAAC"}