import { Http } from '@angular/http' ; import { TranslateLoader } from '@ngx-translate/core' ; import { TranslateHttpLoader } from '@ngx-translate/http-loader' ; export function createTranslateLoader ( http ) { return new TranslateHttpLoader ( http , './assets/i18n/' , '.json' ) ; } export const TRANSLATE_CONFIG = { loader : { provide : TranslateLoader , useFactory : ( createTranslateLoader ) , deps : [ Http ] } } ;