Browse Source

web-ui: Initialize TranslateService

scalafmt-draft
Alexis Hernandez 7 years ago
parent
commit
f4948f18f2
  1. 19
      web-ui/src/app/app.component.ts

19
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 {};
}
}

Loading…
Cancel
Save