Alexis Hernandez
7 years ago
1 changed files with 19 additions and 0 deletions
@ -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…
Reference in new issue