import { NgModule } from '@angular/core' ; import { TranslateHttpLoader } from '@ngx-translate/http-loader' ; import { HttpClient } from '@angular/common/http' ; import { TranslateLoader , TranslateModule as NgxTranslateModule } from '@ngx-translate/core' ; export function HttpLoaderFactory ( http ) { return new TranslateHttpLoader ( http , './assets/i18n/' , '.json' ) ; } @ NgModule ( { declarations : [ ] , exports : [ NgxTranslateModule ] , imports : [ NgxTranslateModule . forChild ( { loader : { provide : TranslateLoader , useFactory : HttpLoaderFactory , deps : [ HttpClient ] } } ) ] } ) export class TranslateModule { }