@rxap/ngx-localize 19.1.1-dev.4 → 19.2.0-dev.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/compodoc/changelog.html +8 -0
  3. package/compodoc/dependencies.html +1 -1
  4. package/compodoc/injectables/LanguageSelectorService.html +12 -11
  5. package/compodoc/js/search/search_index.js +2 -2
  6. package/compodoc/miscellaneous/functions.html +1 -1
  7. package/compodoc/miscellaneous/variables.html +32 -0
  8. package/compodoc/properties.html +1 -1
  9. package/docs/documentation.json +217 -185
  10. package/docs/html/assets/navigation.js +1 -1
  11. package/docs/html/assets/search.js +1 -1
  12. package/docs/html/classes/I18nService.html +3 -3
  13. package/docs/html/classes/LanguageSelectorService.html +4 -4
  14. package/docs/html/functions/LanguageInterceptor.html +2 -2
  15. package/docs/html/functions/defaultLoadModule.html +2 -2
  16. package/docs/html/functions/loadI18nBootstrapHook.html +1 -1
  17. package/docs/html/functions/loadLanguages.html +2 -2
  18. package/docs/html/index.html +2 -2
  19. package/docs/html/modules.html +1 -1
  20. package/docs/html/types/FetchTranslationsFunction.html +1 -1
  21. package/docs/html/types/LoadModuleFunction.html +1 -1
  22. package/docs/html/variables/LOCALE_STORAGE_KEY.html +1 -0
  23. package/docs/markdown/README.md +1 -1
  24. package/docs/markdown/classes/I18nService.md +5 -5
  25. package/docs/markdown/classes/LanguageSelectorService.md +7 -7
  26. package/docs/markdown/functions/LanguageInterceptor.md +2 -2
  27. package/docs/markdown/functions/defaultLoadModule.md +2 -2
  28. package/docs/markdown/functions/loadI18nBootstrapHook.md +2 -2
  29. package/docs/markdown/functions/loadLanguages.md +2 -2
  30. package/docs/markdown/globals.md +6 -2
  31. package/docs/markdown/type-aliases/FetchTranslationsFunction.md +2 -2
  32. package/docs/markdown/type-aliases/LoadModuleFunction.md +2 -2
  33. package/docs/markdown/variables/LOCALE_STORAGE_KEY.md +11 -0
  34. package/docs/wiki/Class.I18nService.md +4 -4
  35. package/docs/wiki/Class.LanguageSelectorService.md +6 -6
  36. package/docs/wiki/Function.LanguageInterceptor.md +1 -1
  37. package/docs/wiki/Function.defaultLoadModule.md +1 -1
  38. package/docs/wiki/Function.loadI18nBootstrapHook.md +1 -1
  39. package/docs/wiki/Function.loadLanguages.md +1 -1
  40. package/docs/wiki/TypeAlias.FetchTranslationsFunction.md +1 -1
  41. package/docs/wiki/TypeAlias.LoadModuleFunction.md +1 -1
  42. package/docs/wiki/Variable.LOCALE_STORAGE_KEY.md +7 -0
  43. package/docs/wiki/_Sidebar.md +4 -0
  44. package/docs/wiki/globals.md +5 -1
  45. package/fesm2022/rxap-ngx-localize.mjs +10 -8
  46. package/fesm2022/rxap-ngx-localize.mjs.map +1 -1
  47. package/index.d.ts +1 -0
  48. package/lib/const.d.ts +1 -0
  49. package/package.json +18 -18
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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.2.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1...@rxap/ngx-localize@19.2.0-dev.0) (2026-02-09)
7
+
8
+ ### Features
9
+
10
+ - **localize:** centralize and reuse locale storage key constant ([34879e9](https://gitlab.com/rxap/packages/commit/34879e9ba4cbe7fd4ccc479c992f3e72a961fc01))
11
+ - **localize:** export additional constants for reuse ([5cc410d](https://gitlab.com/rxap/packages/commit/5cc410da04a3adb7ffb853fc141d6cbe396f5f58))
12
+
13
+ ## [19.1.1](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1-dev.4...@rxap/ngx-localize@19.1.1) (2026-01-23)
14
+
15
+ **Note:** Version bump only for package @rxap/ngx-localize
16
+
6
17
  ## [19.1.1-dev.4](https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1-dev.3...@rxap/ngx-localize@19.1.1-dev.4) (2025-12-08)
7
18
 
8
19
  **Note:** Version bump only for package @rxap/ngx-localize
@@ -85,6 +85,14 @@
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.1...@rxap/ngx-localize@19.2.0-dev.0">19.2.0-dev.0</a> (2026-02-09)</h1>
89
+ <h3>Features</h3>
90
+ <ul>
91
+ <li><strong>localize:</strong> centralize and reuse locale storage key constant (<a href="https://gitlab.com/rxap/packages/commit/34879e9ba4cbe7fd4ccc479c992f3e72a961fc01">34879e9</a>)</li>
92
+ <li><strong>localize:</strong> export additional constants for reuse (<a href="https://gitlab.com/rxap/packages/commit/5cc410da04a3adb7ffb853fc141d6cbe396f5f58">5cc410d</a>)</li>
93
+ </ul>
94
+ <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1-dev.4...@rxap/ngx-localize@19.1.1">19.1.1</a> (2026-01-23)</h2>
95
+ <p><strong>Note:</strong> Version bump only for package @rxap/ngx-localize</p>
88
96
  <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1-dev.3...@rxap/ngx-localize@19.1.1-dev.4">19.1.1-dev.4</a> (2025-12-08)</h2>
89
97
  <p><strong>Note:</strong> Version bump only for package @rxap/ngx-localize</p>
90
98
  <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-localize@19.1.1-dev.2...@rxap/ngx-localize@19.1.1-dev.3">19.1.1-dev.3</a> (2025-08-29)</h2>
@@ -117,7 +117,7 @@
117
117
  <li>
118
118
  <b>@angular/core</b> : ^19.2.1</li>
119
119
  <li>
120
- <b>@rxap/config</b> : ^19.2.0-dev.2</li>
120
+ <b>@rxap/config</b> : ^19.2.0</li>
121
121
  <li>
122
122
  <b>@rxap/ngx-user</b> : ^19.0.4</li>
123
123
  <li>
@@ -221,8 +221,8 @@ selected language, and dynamically change the application&#39;s language setting
221
221
 
222
222
  <tr>
223
223
  <td class="col-md-4">
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>
224
+ <div class="io-line">Defined in <a href="" data-line="37"
225
+ class="link-to-prism">src/lib/language-selector.service.ts:37</a></div>
226
226
  </td>
227
227
  </tr>
228
228
 
@@ -334,7 +334,7 @@ Optionally reloads the page if the <code>reload</code> parameter is set to <code
334
334
  </tr>
335
335
  <tr>
336
336
  <td class="col-md-4">
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>
337
+ <div class="io-line">Defined in <a href="" data-line="24" class="link-to-prism">src/lib/language-selector.service.ts:24</a></div>
338
338
  </td>
339
339
  </tr>
340
340
 
@@ -361,7 +361,7 @@ Optionally reloads the page if the <code>reload</code> parameter is set to <code
361
361
  </tr>
362
362
  <tr>
363
363
  <td class="col-md-4">
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>
364
+ <div class="io-line">Defined in <a href="" data-line="27" class="link-to-prism">src/lib/language-selector.service.ts:27</a></div>
365
365
  </td>
366
366
  </tr>
367
367
 
@@ -394,7 +394,7 @@ Optionally reloads the page if the <code>reload</code> parameter is set to <code
394
394
  </tr>
395
395
  <tr>
396
396
  <td class="col-md-4">
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>
397
+ <div class="io-line">Defined in <a href="" data-line="23" class="link-to-prism">src/lib/language-selector.service.ts:23</a></div>
398
398
  </td>
399
399
  </tr>
400
400
 
@@ -416,12 +416,12 @@ Optionally reloads the page if the <code>reload</code> parameter is set to <code
416
416
  </tr>
417
417
  <tr>
418
418
  <td class="col-md-4">
419
- <i>Default value : </i><code>signal(localStorage.getItem(&quot;locale&quot;) ?? this.defaultLanguage())</code>
419
+ <i>Default value : </i><code>signal(localStorage.getItem(LOCALE_STORAGE_KEY) ?? this.defaultLanguage())</code>
420
420
  </td>
421
421
  </tr>
422
422
  <tr>
423
423
  <td class="col-md-4">
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>
424
+ <div class="io-line">Defined in <a href="" data-line="25" class="link-to-prism">src/lib/language-selector.service.ts:25</a></div>
425
425
  </td>
426
426
  </tr>
427
427
 
@@ -445,6 +445,7 @@ import {
445
445
  ConfigService,
446
446
  LanguagesConfig,
447
447
  } from &#x27;@rxap/config&#x27;;
448
+ import { LOCALE_STORAGE_KEY } from &#x27;./const&#x27;;
448
449
 
449
450
  /**
450
451
  * A service that manages language selection and configuration for the application.
@@ -457,7 +458,7 @@ export class LanguageSelectorService {
457
458
 
458
459
  public readonly languages: Signal&lt;LanguagesConfig&gt; &#x3D; signal(this.config.get&lt;LanguagesConfig&gt;(&#x27;i18n.languages&#x27;, {}));
459
460
  public readonly defaultLanguage: Signal&lt;string&gt; &#x3D; signal(this.config.get(&#x27;i18n.defaultLanguage&#x27;, Object.keys(this.languages())[0] ?? &#x27;en&#x27;));
460
- public readonly selectedLanguage &#x3D; signal(localStorage.getItem(&quot;locale&quot;) ?? this.defaultLanguage());
461
+ public readonly selectedLanguage &#x3D; signal(localStorage.getItem(LOCALE_STORAGE_KEY) ?? this.defaultLanguage());
461
462
 
462
463
  public readonly hasLanguages &#x3D; computed(() &#x3D;&gt; Object.keys(this.languages()).length &gt; 1);
463
464
 
@@ -472,11 +473,11 @@ export class LanguageSelectorService {
472
473
  public async setLanguage(language: string, reload &#x3D; false) {
473
474
  if (language !&#x3D;&#x3D; this.selectedLanguage()) {
474
475
  if (Object.keys(this.languages()).includes(language)) {
475
- localStorage.setItem(&quot;locale&quot;, language);
476
+ localStorage.setItem(LOCALE_STORAGE_KEY, language);
476
477
  } else if (this.defaultLanguage()) {
477
- localStorage.setItem(&quot;locale&quot;, this.defaultLanguage());
478
+ localStorage.setItem(LOCALE_STORAGE_KEY, this.defaultLanguage());
478
479
  } else {
479
- localStorage.removeItem(&quot;locale&quot;);
480
+ localStorage.removeItem(LOCALE_STORAGE_KEY);
480
481
  }
481
482
  if (reload) {
482
483
  location.reload();