@alfresco/adf-core 8.4.0-20101202984 → 8.4.0-20104568949

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.
@@ -5,7 +5,7 @@ import { CommonModule, DOCUMENT, NgIf, NgClass, NgForOf, AsyncPipe, NgTemplateOu
5
5
  import * as i2 from '@angular/material/table';
6
6
  import { MatTableModule, MatTableDataSource } from '@angular/material/table';
7
7
  import * as i1$1 from '@ngx-translate/core';
8
- import { TranslatePipe, provideTranslateService, TranslateLoader } from '@ngx-translate/core';
8
+ import { TranslatePipe, provideTranslateService, TranslateLoader, TranslateService } from '@ngx-translate/core';
9
9
  import * as i1$8 from '@angular/common/http';
10
10
  import { HttpClient, HttpHeaders, HttpResponse, provideHttpClient, HTTP_INTERCEPTORS, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
11
11
  import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, firstValueFrom, combineLatest, defer, EMPTY, race, forkJoin, merge, isObservable, filter as filter$1 } from 'rxjs';
@@ -10997,6 +10997,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
10997
10997
  * @returns An array of providers for the i18n service.
10998
10998
  */
10999
10999
  function provideI18N(config) {
11000
+ const defaultLanguage = config?.defaultLanguage || 'en';
11000
11001
  const result = [
11001
11002
  provideTranslateService({
11002
11003
  loader: {
@@ -11004,7 +11005,7 @@ function provideI18N(config) {
11004
11005
  useExisting: TranslateLoaderService,
11005
11006
  deps: [HttpClient]
11006
11007
  },
11007
- defaultLanguage: config?.defaultLanguage || 'en'
11008
+ defaultLanguage
11008
11009
  })
11009
11010
  ];
11010
11011
  if (config?.assets) {
@@ -11012,6 +11013,13 @@ function provideI18N(config) {
11012
11013
  result.push(provideTranslations(id, path));
11013
11014
  });
11014
11015
  }
11016
+ if (config?.translations) {
11017
+ result.push(provideAppInitializer(() => {
11018
+ const translateService = inject(TranslateService);
11019
+ translateService.setTranslation(defaultLanguage, config.translations, true);
11020
+ return Promise.resolve();
11021
+ }));
11022
+ }
11015
11023
  return result;
11016
11024
  }
11017
11025