add ngx translate

This commit is contained in:
Maxime GRIS
2017-12-04 13:52:57 +01:00
parent f4bc5b21bc
commit facda3726d
6 changed files with 42 additions and 12 deletions

View File

@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { ElectronService } from './providers/electron.service';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'app-root',
@@ -7,7 +8,10 @@ import { ElectronService } from './providers/electron.service';
styleUrls: ['./app.component.scss']
})
export class AppComponent {
constructor(public electronService: ElectronService) {
constructor(public electronService: ElectronService,
private translate: TranslateService) {
translate.setDefaultLang('en');
if (electronService.isElectron()) {
console.log('Mode electron');