From 0d78e35de1e191d1086790f614a28a5abe776f07 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 25 Sep 2018 21:45:57 +0100 Subject: [PATCH] i18n workaround for non-supported langs (#3819) --- demo-shell/src/app/app.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/demo-shell/src/app/app.component.ts b/demo-shell/src/app/app.component.ts index eb321d25a8..e268bad09c 100644 --- a/demo-shell/src/app/app.component.ts +++ b/demo-shell/src/app/app.component.ts @@ -16,7 +16,7 @@ */ import { Component, ViewEncapsulation, OnInit } from '@angular/core'; -import { AuthenticationService, AlfrescoApiService, PageTitleService } from '@alfresco/adf-core'; +import { AuthenticationService, AlfrescoApiService, PageTitleService, TranslationService } from '@alfresco/adf-core'; import { Router } from '@angular/router'; @Component({ @@ -30,11 +30,17 @@ export class AppComponent implements OnInit { constructor(private pageTitleService: PageTitleService, private alfrescoApiService: AlfrescoApiService, private authenticationService: AuthenticationService, + private translationService: TranslationService, private router: Router) { } ngOnInit() { + // workaround for https://github.com/ngx-translate/core/issues/575 + this.translationService.translate.getTranslation('en').subscribe(() => { + this.translationService.translate.setDefaultLang('en'); + }); + this.pageTitleService.setTitle('title'); this.alfrescoApiService.getInstance().on('error', (error) => {