@rxap/ngx-localize 19.1.0-dev.4 → 19.1.0-dev.7

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/compodoc/changelog.html +12 -0
  3. package/compodoc/injectables/LanguageSelectorService.html +46 -7
  4. package/compodoc/js/search/search_index.js +2 -2
  5. package/compodoc/miscellaneous/functions.html +111 -4
  6. package/compodoc/properties.html +1 -1
  7. package/docs/documentation.json +260 -45
  8. package/docs/html/classes/I18nService.html +3 -3
  9. package/docs/html/classes/LanguageSelectorService.html +10 -2
  10. package/docs/html/functions/LanguageInterceptor.html +5 -1
  11. package/docs/html/functions/loadI18nBootstrapHook.html +4 -1
  12. package/docs/html/functions/loadLanguages.html +9 -1
  13. package/docs/html/functions/xliffToJson.html +4 -1
  14. package/docs/html/index.html +2 -2
  15. package/docs/html/modules.html +1 -1
  16. package/docs/markdown/README.md +1 -1
  17. package/docs/markdown/classes/I18nService.md +5 -5
  18. package/docs/markdown/classes/LanguageSelectorService.md +22 -9
  19. package/docs/markdown/functions/LanguageInterceptor.md +10 -2
  20. package/docs/markdown/functions/loadI18nBootstrapHook.md +8 -2
  21. package/docs/markdown/functions/loadLanguages.md +20 -6
  22. package/docs/markdown/functions/xliffToJson.md +8 -2
  23. package/docs/markdown/globals.md +2 -2
  24. package/docs/wiki/Class.I18nService.md +4 -4
  25. package/docs/wiki/Class.LanguageSelectorService.md +21 -8
  26. package/docs/wiki/Function.LanguageInterceptor.md +9 -1
  27. package/docs/wiki/Function.loadI18nBootstrapHook.md +7 -1
  28. package/docs/wiki/Function.loadLanguages.md +19 -5
  29. package/docs/wiki/Function.xliffToJson.md +7 -1
  30. package/docs/wiki/globals.md +1 -1
  31. package/fesm2022/rxap-ngx-localize.mjs +84 -14
  32. package/fesm2022/rxap-ngx-localize.mjs.map +1 -1
  33. package/lib/language-interceptor.d.ts +7 -0
  34. package/lib/language-selector.service.d.ts +13 -0
  35. package/lib/load-i18n-bootstrap-hook.d.ts +6 -0
  36. package/lib/load-languages.d.ts +11 -0
  37. package/lib/xliff-to-json.d.ts +6 -0
  38. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [19.1.0-dev.7](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.6...@rxap/ngx-localize@19.1.0-dev.7) (2025-05-15)
7
+
8
+ **Note:** Version bump only for package @rxap/ngx-localize
9
+
10
+ # [19.1.0-dev.6](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.5...@rxap/ngx-localize@19.1.0-dev.6) (2025-05-15)
11
+
12
+ ### Bug Fixes
13
+
14
+ - support translation loading ([eebdf58](https://gitlab.com/rxap/packages/commit/eebdf58381a9ca82a9fca9b9fd5cf664e82fc492))
15
+
16
+ # [19.1.0-dev.5](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.4...@rxap/ngx-localize@19.1.0-dev.5) (2025-05-15)
17
+
18
+ ### Bug Fixes
19
+
20
+ - support translation interpolation ([6908776](https://gitlab.com/rxap/packages/commit/69087764116316bcc9675ccc028b5134aee9ab52))
21
+
6
22
  # [19.1.0-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.3...@rxap/ngx-localize@19.1.0-dev.4) (2025-05-15)
7
23
 
8
24
  ### Features
@@ -85,6 +85,18 @@
85
85
  <h1>Change Log</h1>
86
86
  <p>All notable changes to this project will be documented in this file.
87
87
  See <a href="https://conventionalcommits.org">Conventional Commits</a> for commit guidelines.</p>
88
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.6...@rxap/ngx-localize@19.1.0-dev.7">19.1.0-dev.7</a> (2025-05-15)</h1>
89
+ <p><strong>Note:</strong> Version bump only for package @rxap/ngx-localize</p>
90
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.5...@rxap/ngx-localize@19.1.0-dev.6">19.1.0-dev.6</a> (2025-05-15)</h1>
91
+ <h3>Bug Fixes</h3>
92
+ <ul>
93
+ <li>support translation loading (<a href="https://gitlab.com/rxap/packages/commit/eebdf58381a9ca82a9fca9b9fd5cf664e82fc492">eebdf58</a>)</li>
94
+ </ul>
95
+ <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.4...@rxap/ngx-localize@19.1.0-dev.5">19.1.0-dev.5</a> (2025-05-15)</h1>
96
+ <h3>Bug Fixes</h3>
97
+ <ul>
98
+ <li>support translation interpolation (<a href="https://gitlab.com/rxap/packages/commit/69087764116316bcc9675ccc028b5134aee9ab52">6908776</a>)</li>
99
+ </ul>
88
100
  <h1><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.0-dev.3...@rxap/ngx-localize@19.1.0-dev.4">19.1.0-dev.4</a> (2025-05-15)</h1>
89
101
  <h3>Features</h3>
90
102
  <ul>
@@ -119,6 +119,15 @@
119
119
  </p>
120
120
 
121
121
 
122
+ <p class="comment">
123
+ <h3>Description</h3>
124
+ </p>
125
+ <p class="comment">
126
+ <p>A service that manages language selection and configuration for the application.
127
+ Provides functionality to retrieve available languages, default language,
128
+ selected language, and dynamically change the application&#39;s language settings.</p>
129
+
130
+ </p>
122
131
 
123
132
 
124
133
 
@@ -212,14 +221,17 @@
212
221
 
213
222
  <tr>
214
223
  <td class="col-md-4">
215
- <div class="io-line">Defined in <a href="" data-line="23"
216
- class="link-to-prism">src/lib/language-selector.service.ts:23</a></div>
224
+ <div class="io-line">Defined in <a href="" data-line="36"
225
+ class="link-to-prism">src/lib/language-selector.service.ts:36</a></div>
217
226
  </td>
218
227
  </tr>
219
228
 
220
229
 
221
230
  <tr>
222
231
  <td class="col-md-4">
232
+ <div class="io-description"><p>Sets the application language to the specified value if it exists in the list of supported languages.
233
+ Optionally reloads the page if the <code>reload</code> parameter is set to <code>true</code>.</p>
234
+ </div>
223
235
 
224
236
  <div class="io-description">
225
237
  <b>Parameters :</b>
@@ -231,6 +243,7 @@
231
243
  <td>Type</td>
232
244
  <td>Optional</td>
233
245
  <td>Default value</td>
246
+ <td>Description</td>
234
247
  </tr>
235
248
  </thead>
236
249
  <tbody>
@@ -247,6 +260,12 @@
247
260
  <td>
248
261
  </td>
249
262
 
263
+ <td>
264
+ <ul>
265
+ <li>The language code to set as the active language.</li>
266
+ </ul>
267
+
268
+ </td>
250
269
  </tr>
251
270
  <tr>
252
271
  <td>reload</td>
@@ -261,6 +280,12 @@
261
280
  <code>false</code>
262
281
  </td>
263
282
 
283
+ <td>
284
+ <ul>
285
+ <li>A flag indicating whether to reload the page after updating the language.</li>
286
+ </ul>
287
+
288
+ </td>
264
289
  </tr>
265
290
  </tbody>
266
291
  </table>
@@ -270,7 +295,8 @@
270
295
 
271
296
  </div>
272
297
  <div class="io-description">
273
-
298
+ <p>A promise that resolves once the language has been set and optional reload is completed.</p>
299
+
274
300
  </div>
275
301
  </td>
276
302
  </tr>
@@ -308,7 +334,7 @@
308
334
  </tr>
309
335
  <tr>
310
336
  <td class="col-md-4">
311
- <div class="io-line">Defined in <a href="" data-line="18" class="link-to-prism">src/lib/language-selector.service.ts:18</a></div>
337
+ <div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">src/lib/language-selector.service.ts:23</a></div>
312
338
  </td>
313
339
  </tr>
314
340
 
@@ -335,7 +361,7 @@
335
361
  </tr>
336
362
  <tr>
337
363
  <td class="col-md-4">
338
- <div class="io-line">Defined in <a href="" data-line="21" class="link-to-prism">src/lib/language-selector.service.ts:21</a></div>
364
+ <div class="io-line">Defined in <a href="" data-line="26" class="link-to-prism">src/lib/language-selector.service.ts:26</a></div>
339
365
  </td>
340
366
  </tr>
341
367
 
@@ -368,7 +394,7 @@
368
394
  </tr>
369
395
  <tr>
370
396
  <td class="col-md-4">
371
- <div class="io-line">Defined in <a href="" data-line="17" class="link-to-prism">src/lib/language-selector.service.ts:17</a></div>
397
+ <div class="io-line">Defined in <a href="" data-line="22" class="link-to-prism">src/lib/language-selector.service.ts:22</a></div>
372
398
  </td>
373
399
  </tr>
374
400
 
@@ -395,7 +421,7 @@
395
421
  </tr>
396
422
  <tr>
397
423
  <td class="col-md-4">
398
- <div class="io-line">Defined in <a href="" data-line="19" class="link-to-prism">src/lib/language-selector.service.ts:19</a></div>
424
+ <div class="io-line">Defined in <a href="" data-line="24" class="link-to-prism">src/lib/language-selector.service.ts:24</a></div>
399
425
  </td>
400
426
  </tr>
401
427
 
@@ -420,6 +446,11 @@ import {
420
446
  LanguagesConfig,
421
447
  } from &#x27;@rxap/config&#x27;;
422
448
 
449
+ /**
450
+ * A service that manages language selection and configuration for the application.
451
+ * Provides functionality to retrieve available languages, default language,
452
+ * selected language, and dynamically change the application&#x27;s language settings.
453
+ */
423
454
  @Injectable({ providedIn: &#x27;root&#x27; })
424
455
  export class LanguageSelectorService {
425
456
  private readonly config &#x3D; inject(ConfigService);
@@ -430,6 +461,14 @@ export class LanguageSelectorService {
430
461
 
431
462
  public readonly hasLanguages &#x3D; computed(() &#x3D;&gt; Object.keys(this.languages()).length &gt; 1);
432
463
 
464
+ /**
465
+ * Sets the application language to the specified value if it exists in the list of supported languages.
466
+ * Optionally reloads the page if the &#x60;reload&#x60; parameter is set to &#x60;true&#x60;.
467
+ *
468
+ * @param {string} language - The language code to set as the active language.
469
+ * @param {boolean} [reload&#x3D;false] - A flag indicating whether to reload the page after updating the language.
470
+ * @return {Promise&lt;void&gt;} A promise that resolves once the language has been set and optional reload is completed.
471
+ */
433
472
  public async setLanguage(language: string, reload &#x3D; false) {
434
473
  if (language !&#x3D;&#x3D; this.selectedLanguage()) {
435
474
  if (Object.keys(this.languages()).includes(language)) {