import { Component } from '@angular/core' ; import { TranslateService } from '@rxweb/ngx-translate-extension' ; @ Component ( { selector : 'app-root' , templateUrl : './app.component.html' , styleUrls : [ './app.component.css' ] } ) export class AppComponent { constructor ( public translate ) { translate . addLangs ( [ 'en' , 'es' , 'fr' ] ) ; translate . setDefaultLang ( 'en' ) ; translate . use ( 'en' ) ; } title = 'ngx-translate-demo' ; }