mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
i18n workaround for non-supported langs (#3819)
This commit is contained in:
committed by
Eugenio Romano
parent
431bde3ddf
commit
0d78e35de1
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user