common-header-lib 0.0.15 → 0.0.16
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 +24 -24
- package/assets/i18n/ar.json +2 -1
- package/assets/i18n/de.json +2 -1
- package/assets/i18n/en.json +2 -2
- package/assets/i18n/es.json +2 -1
- package/assets/i18n/fr.json +2 -1
- package/assets/i18n/hi.json +2 -1
- package/assets/i18n/ja.json +2 -1
- package/assets/i18n/ko.json +2 -1
- package/assets/i18n/languages.json +1 -0
- package/assets/images/toast-alert.svg +3 -3
- package/assets/images/toast-error.svg +3 -3
- package/assets/images/toast-info.svg +3 -3
- package/assets/images/toast-success.svg +10 -10
- package/assets/scss/styles.scss +577 -577
- package/esm2020/lib/common-header-lib.component.mjs +1 -1
- package/esm2020/lib/common-header-lib.module.mjs +39 -15
- package/esm2020/lib/common-header-lib.service.mjs +1 -1
- package/esm2020/lib/components/confirm-dialog/confirm-dialog.component.mjs +3 -3
- package/esm2020/lib/components/ng-translation/ng-translation.component.mjs +33 -27
- package/esm2020/lib/model/data_model.mjs +17 -5
- package/esm2020/lib/services/http/http-common.service.mjs +1 -1
- package/esm2020/public-api.mjs +1 -1
- package/fesm2015/common-header-lib.mjs +87 -47
- package/fesm2015/common-header-lib.mjs.map +1 -1
- package/fesm2020/common-header-lib.mjs +85 -45
- package/fesm2020/common-header-lib.mjs.map +1 -1
- package/lib/common-header-lib.module.d.ts +2 -1
- package/lib/components/ng-translation/ng-translation.component.d.ts +6 -8
- package/lib/model/data_model.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/i18n/ar.json +2 -1
- package/src/assets/i18n/de.json +2 -1
- package/src/assets/i18n/en.json +2 -2
- package/src/assets/i18n/es.json +2 -1
- package/src/assets/i18n/fr.json +2 -1
- package/src/assets/i18n/hi.json +2 -1
- package/src/assets/i18n/ja.json +2 -1
- package/src/assets/i18n/ko.json +2 -1
- package/src/assets/i18n/languages.json +1 -0
- package/src/assets/images/toast-alert.svg +3 -3
- package/src/assets/images/toast-error.svg +3 -3
- package/src/assets/images/toast-info.svg +3 -3
- package/src/assets/images/toast-success.svg +10 -10
- package/src/assets/scss/styles.scss +577 -577
|
@@ -3,7 +3,7 @@ import { Injectable, EventEmitter, Component, Output, Pipe, Input, ViewEncapsula
|
|
|
3
3
|
import { map, catchError, debounceTime, take, switchMap, takeUntil, finalize } from 'rxjs/operators';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { HttpParams, HttpClientModule, HttpClient } from '@angular/common/http';
|
|
6
|
-
import { throwError, BehaviorSubject, Subject, map as map$1, catchError as catchError$1, of, takeUntil as takeUntil$1, finalize as finalize$1, forkJoin } from 'rxjs';
|
|
6
|
+
import { throwError, BehaviorSubject, Subject, map as map$1, catchError as catchError$1, of, takeUntil as takeUntil$1, finalize as finalize$1, forkJoin, firstValueFrom } from 'rxjs';
|
|
7
7
|
import { __awaiter } from 'tslib';
|
|
8
8
|
import * as i10$1 from 'primeng/overlaypanel';
|
|
9
9
|
import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
|
|
@@ -67,14 +67,26 @@ GlobalConstants.PAGEROW = 10;
|
|
|
67
67
|
GlobalConstants.CONFIGCONNECTORS = false;
|
|
68
68
|
GlobalConstants.USERLANGUAGES = [
|
|
69
69
|
{ langKey: 'en', langName: 'English' },
|
|
70
|
-
{ langKey: 'ar', langName: 'العربية' },
|
|
71
|
-
{ langKey: 'es', langName: 'Español' },
|
|
72
70
|
{ langKey: 'hi', langName: 'हिन्दी' },
|
|
73
|
-
{ langKey: '
|
|
71
|
+
{ langKey: 'mr', langName: 'मराठी' },
|
|
72
|
+
{ langKey: 'ar', langName: 'العربية' },
|
|
74
73
|
{ langKey: 'fr', langName: 'Français' },
|
|
74
|
+
{ langKey: 'es', langName: 'Español' },
|
|
75
75
|
{ langKey: 'de', langName: 'Deutsch' },
|
|
76
|
-
{ langKey: '
|
|
76
|
+
{ langKey: 'ja', langName: '日本語' },
|
|
77
|
+
{ langKey: 'ko', langName: '한국어' },
|
|
78
|
+
{ langKey: 'zh', langName: '中文' },
|
|
79
|
+
{ langKey: 'ru', langName: 'Русский' },
|
|
80
|
+
{ langKey: 'pt', langName: 'Português' },
|
|
81
|
+
{ langKey: 'it', langName: 'Italiano' },
|
|
82
|
+
{ langKey: 'nl', langName: 'Nederlands' },
|
|
83
|
+
{ langKey: 'tr', langName: 'Türkçe' },
|
|
84
|
+
{ langKey: 'sv', langName: 'Svenska' },
|
|
85
|
+
{ langKey: 'pl', langName: 'Polski' },
|
|
86
|
+
{ langKey: 'th', langName: 'ไทย' },
|
|
87
|
+
{ langKey: 'vi', langName: 'Tiếng Việt' },
|
|
77
88
|
];
|
|
89
|
+
GlobalConstants.USERFILTEREDLANGUAGES = [];
|
|
78
90
|
GlobalConstants.DEFAULTLANG = { langKey: 'en', langName: 'English' };
|
|
79
91
|
GlobalConstants.DEFAULTLANGKEY = 'en';
|
|
80
92
|
GlobalConstants.DEFAULT_IMGPATH = 'assets/images/';
|
|
@@ -2504,54 +2516,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
2504
2516
|
}], ctorParameters: function () { return [{ type: CommonHeaderLibService }, { type: i2.FormBuilder }, { type: ToastMsgService }, { type: EncrydecryRSAdataService }, { type: RESTLoginFormService }, { type: ASYNCPasswordcheckService }, { type: i4.TranslateService }, { type: VaptValidationService }, { type: i1$3.DynamicDialogConfig }, { type: HttpCommonService }, { type: HttpGeneralConfigurationService }]; } });
|
|
2505
2517
|
|
|
2506
2518
|
class NgTranslationComponent {
|
|
2507
|
-
constructor(_translate, _localstorage,
|
|
2519
|
+
constructor(_translate, _localstorage, msgService) {
|
|
2508
2520
|
this._translate = _translate;
|
|
2509
2521
|
this._localstorage = _localstorage;
|
|
2510
|
-
this.
|
|
2511
|
-
|
|
2512
|
-
this.languages = GlobalConstants.USERLANGUAGES;
|
|
2522
|
+
this.msgService = msgService;
|
|
2523
|
+
this.languages = [];
|
|
2513
2524
|
this.selectedLang = {};
|
|
2514
2525
|
}
|
|
2515
2526
|
ngOnInit() {
|
|
2516
|
-
this.
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2527
|
+
this.loadLanguages();
|
|
2528
|
+
}
|
|
2529
|
+
loadLanguages() {
|
|
2530
|
+
/* 1. Load filtered languages */
|
|
2531
|
+
this.languages = GlobalConstants.USERFILTEREDLANGUAGES || [];
|
|
2532
|
+
/* 2. Read saved language */
|
|
2533
|
+
const savedLang = this._localstorage.getData(COOKIECONSTANT.USERLANG);
|
|
2534
|
+
if (savedLang) {
|
|
2522
2535
|
try {
|
|
2523
|
-
|
|
2536
|
+
const parsed = JSON.parse(savedLang);
|
|
2537
|
+
const validLang = this.languages.find((x) => x.langKey === (parsed === null || parsed === void 0 ? void 0 : parsed.langKey));
|
|
2538
|
+
this.selectedLang = validLang || GlobalConstants.DEFAULTLANG;
|
|
2524
2539
|
}
|
|
2525
|
-
catch (
|
|
2526
|
-
// If corrupted JSON, fallback to default
|
|
2540
|
+
catch (_a) {
|
|
2527
2541
|
this.selectedLang = GlobalConstants.DEFAULTLANG;
|
|
2528
|
-
this.saveUserLanguage(this.selectedLang);
|
|
2529
2542
|
}
|
|
2530
2543
|
}
|
|
2531
2544
|
else {
|
|
2532
|
-
// 2. First time → set default
|
|
2533
2545
|
this.selectedLang = GlobalConstants.DEFAULTLANG;
|
|
2534
|
-
this.saveUserLanguage(this.selectedLang);
|
|
2535
2546
|
}
|
|
2536
|
-
// 3. Apply language
|
|
2537
|
-
this._translate.use(this.selectedLang.langKey);
|
|
2538
2547
|
}
|
|
2539
|
-
|
|
2548
|
+
/* Language Change */
|
|
2540
2549
|
selectLang(event) {
|
|
2541
2550
|
this.selectedLang = event === null || event === void 0 ? void 0 : event.value;
|
|
2542
|
-
this.
|
|
2543
|
-
|
|
2551
|
+
this.useTranslate(this.selectedLang);
|
|
2552
|
+
}
|
|
2553
|
+
useTranslate(selectedLang) {
|
|
2554
|
+
this._translate.use(selectedLang.langKey).subscribe({
|
|
2555
|
+
next: () => {
|
|
2556
|
+
this.saveUserLanguage(selectedLang);
|
|
2557
|
+
},
|
|
2558
|
+
error: () => {
|
|
2559
|
+
this.msgService.error(this._translate.instant('Generic_lib.FailedToLoadLanguageFile'));
|
|
2560
|
+
},
|
|
2561
|
+
});
|
|
2544
2562
|
}
|
|
2545
2563
|
saveUserLanguage(lang) {
|
|
2546
2564
|
this._localstorage.saveData(COOKIECONSTANT.USERLANG, JSON.stringify(lang));
|
|
2547
2565
|
}
|
|
2548
2566
|
}
|
|
2549
|
-
NgTranslationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTranslationComponent, deps: [{ token: i4.TranslateService }, { token: StorageService }, { token:
|
|
2567
|
+
NgTranslationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTranslationComponent, deps: [{ token: i4.TranslateService }, { token: StorageService }, { token: ToastMsgService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2550
2568
|
NgTranslationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgTranslationComponent, selector: "ng-translation", ngImport: i0, template: "<p-dropdown [options]=\"languages\" optionLabel=\"langName\" placeholder='{{ \"Generic_lib.SelectLanguage\" | translate }}'\r\n (onChange)=\"selectLang($event)\" [filter]=\"true\" filterBy=\"langName\"\r\n filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}' [showClear]=\"false\"\r\n [(ngModel)]=\"selectedLang\"></p-dropdown>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i8.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "overlayDirection", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] });
|
|
2551
2569
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgTranslationComponent, decorators: [{
|
|
2552
2570
|
type: Component,
|
|
2553
|
-
args: [{ selector: 'ng-translation', template: "<p-dropdown [options]=\"languages\" optionLabel=\"langName\" placeholder='{{ \"Generic_lib.SelectLanguage\" | translate }}'\r\n (onChange)=\"selectLang($event)\" [filter]=\"true\" filterBy=\"langName\"\r\n filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}' [showClear]=\"false\"\r\n [(ngModel)]=\"selectedLang\"></p-dropdown>\r\n" }]
|
|
2554
|
-
}], ctorParameters: function () { return [{ type: i4.TranslateService }, { type: StorageService }, { type:
|
|
2571
|
+
args: [{ selector: 'ng-translation', standalone: false, template: "<p-dropdown [options]=\"languages\" optionLabel=\"langName\" placeholder='{{ \"Generic_lib.SelectLanguage\" | translate }}'\r\n (onChange)=\"selectLang($event)\" [filter]=\"true\" filterBy=\"langName\"\r\n filterPlaceholder='{{ \"Generic_lib.Search\" | translate }}' [showClear]=\"false\"\r\n [(ngModel)]=\"selectedLang\"></p-dropdown>\r\n" }]
|
|
2572
|
+
}], ctorParameters: function () { return [{ type: i4.TranslateService }, { type: StorageService }, { type: ToastMsgService }]; } });
|
|
2555
2573
|
|
|
2556
2574
|
class SliceToTwoPipe {
|
|
2557
2575
|
transform(textName) {
|
|
@@ -3321,10 +3339,10 @@ class ConfirmDialogComponent {
|
|
|
3321
3339
|
}
|
|
3322
3340
|
}
|
|
3323
3341
|
ConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: i9.ConfirmationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
3324
|
-
ConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmDialogComponent, selector: "confirm-dialog", inputs: { header: "header", message: "message" }, outputs: { result: "result" }, providers: [ConfirmationService], ngImport: i0, template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: i2$1.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] });
|
|
3342
|
+
ConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmDialogComponent, selector: "confirm-dialog", inputs: { header: "header", message: "message" }, outputs: { result: "result" }, providers: [ConfirmationService], ngImport: i0, template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\r\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "component", type: i2$1.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] });
|
|
3325
3343
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
3326
3344
|
type: Component,
|
|
3327
|
-
args: [{ selector: 'confirm-dialog', providers: [ConfirmationService], template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\n</div>\n" }]
|
|
3345
|
+
args: [{ selector: 'confirm-dialog', providers: [ConfirmationService], template: "<div class=\"card flex justify-center gap-2 view-pass-details confirmtion-modal\">\r\n <p-confirmDialog icon=\"none\" acceptIcon=\"\" rejectIcon=\"\"></p-confirmDialog>\r\n</div>\r\n" }]
|
|
3328
3346
|
}], ctorParameters: function () { return [{ type: i9.ConfirmationService }]; }, propDecorators: { header: [{
|
|
3329
3347
|
type: Input,
|
|
3330
3348
|
args: ['header']
|
|
@@ -3978,7 +3996,7 @@ CommonHeaderLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", v
|
|
|
3978
3996
|
{
|
|
3979
3997
|
provide: APP_INITIALIZER,
|
|
3980
3998
|
useFactory: initTranslateService,
|
|
3981
|
-
deps: [TranslateService, StorageService],
|
|
3999
|
+
deps: [TranslateService, StorageService, HttpClient, ToastMsgService],
|
|
3982
4000
|
multi: true,
|
|
3983
4001
|
},
|
|
3984
4002
|
], imports: [CommonModule,
|
|
@@ -4065,38 +4083,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
4065
4083
|
{
|
|
4066
4084
|
provide: APP_INITIALIZER,
|
|
4067
4085
|
useFactory: initTranslateService,
|
|
4068
|
-
deps: [TranslateService, StorageService],
|
|
4086
|
+
deps: [TranslateService, StorageService, HttpClient, ToastMsgService],
|
|
4069
4087
|
multi: true,
|
|
4070
4088
|
},
|
|
4071
4089
|
],
|
|
4072
4090
|
}]
|
|
4073
4091
|
}] });
|
|
4074
|
-
function initTranslateService(translate, localStorageService) {
|
|
4075
|
-
return () => {
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4092
|
+
function initTranslateService(translate, localStorageService, http, msgService) {
|
|
4093
|
+
return () => __awaiter(this, void 0, void 0, function* () {
|
|
4094
|
+
let selectedLang = GlobalConstants.DEFAULTLANG;
|
|
4095
|
+
try {
|
|
4096
|
+
/* 1. Load allowed languages from JSON */
|
|
4097
|
+
const codes = yield firstValueFrom(http.get('assets/common-header-lib/i18n/languages.json'));
|
|
4098
|
+
/* 2. Filter languages */
|
|
4099
|
+
GlobalConstants.USERFILTEREDLANGUAGES =
|
|
4100
|
+
GlobalConstants.USERLANGUAGES.filter((lang, index, self) => (codes === null || codes === void 0 ? void 0 : codes.includes(lang.langKey)) &&
|
|
4101
|
+
index === self.findIndex((x) => x.langKey === lang.langKey));
|
|
4102
|
+
/* 3. Fallback if empty */
|
|
4103
|
+
if (!GlobalConstants.USERFILTEREDLANGUAGES ||
|
|
4104
|
+
GlobalConstants.USERFILTEREDLANGUAGES.length === 0) {
|
|
4105
|
+
GlobalConstants.USERFILTEREDLANGUAGES = [GlobalConstants.DEFAULTLANG];
|
|
4106
|
+
}
|
|
4107
|
+
}
|
|
4108
|
+
catch (_a) {
|
|
4109
|
+
/* If languages.json fails */
|
|
4110
|
+
GlobalConstants.USERFILTEREDLANGUAGES = [GlobalConstants.DEFAULTLANG];
|
|
4111
|
+
//* Note: Here we directly use English toast as no any .json file is loaded and we cannot rely on translate service to get the message.
|
|
4112
|
+
msgService.error('Failed to load language file.', 'Error');
|
|
4113
|
+
}
|
|
4114
|
+
/* 4. Read saved language */
|
|
4080
4115
|
const saved = localStorageService.getData(COOKIECONSTANT.USERLANG);
|
|
4081
4116
|
if (saved) {
|
|
4082
4117
|
try {
|
|
4083
4118
|
const parsed = JSON.parse(saved);
|
|
4084
|
-
const isValid =
|
|
4119
|
+
const isValid = GlobalConstants.USERFILTEREDLANGUAGES.some((lang) => lang.langKey === (parsed === null || parsed === void 0 ? void 0 : parsed.langKey));
|
|
4085
4120
|
if (isValid) {
|
|
4086
4121
|
selectedLang = parsed;
|
|
4087
4122
|
}
|
|
4088
4123
|
}
|
|
4089
|
-
catch (
|
|
4090
|
-
|
|
4091
|
-
selectedLang = defaultLang;
|
|
4124
|
+
catch (_b) {
|
|
4125
|
+
selectedLang = GlobalConstants.DEFAULTLANG;
|
|
4092
4126
|
}
|
|
4093
4127
|
}
|
|
4094
|
-
/*
|
|
4128
|
+
/* 5. Ensure selected language exists */
|
|
4129
|
+
const validSelected = GlobalConstants.USERFILTEREDLANGUAGES.find((x) => x.langKey === selectedLang.langKey);
|
|
4130
|
+
if (!validSelected) {
|
|
4131
|
+
selectedLang =
|
|
4132
|
+
GlobalConstants.USERFILTEREDLANGUAGES[0] || GlobalConstants.DEFAULTLANG;
|
|
4133
|
+
}
|
|
4134
|
+
/* 6. Save corrected language */
|
|
4095
4135
|
localStorageService.saveData(COOKIECONSTANT.USERLANG, JSON.stringify(selectedLang));
|
|
4096
|
-
/*
|
|
4136
|
+
/* 7. Apply translation */
|
|
4097
4137
|
translate.setDefaultLang(selectedLang.langKey);
|
|
4098
|
-
|
|
4099
|
-
};
|
|
4138
|
+
yield firstValueFrom(translate.use(selectedLang.langKey));
|
|
4139
|
+
});
|
|
4100
4140
|
}
|
|
4101
4141
|
function createLibTranslateLoader(http) {
|
|
4102
4142
|
return new TranslateHttpLoader(http, 'assets/common-header-lib/i18n/', '.json');
|