diff --git a/web-ui/src/app/app.component.ts b/web-ui/src/app/app.component.ts index 68478a8..5089420 100644 --- a/web-ui/src/app/app.component.ts +++ b/web-ui/src/app/app.component.ts @@ -1,9 +1,28 @@ import { Component } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; + +import { DEFAULT_LANG, LanguageService } from './services/language.service'; + @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { + + constructor( + private translate: TranslateService, + private languageService: LanguageService) { + + translate.setDefaultLang(DEFAULT_LANG); + translate.use(languageService.getLang()); + + // define langs + translate.setTranslation('en', this.englishLang()); + } + + englishLang(): Object { + return {}; + } }