import { Injectable } from '@angular/core' ; import { TranslateService } from '@ngx-translate/core' ; export interface Locale { lang : string ; data : Object ; } @ Injectable ( { providedIn : 'root' } ) export class FuseTranslationLoaderService { param { TranslateService } _translateService constructor ( private _translateService ) { } param { Locale } args loadTranslations ( ... args ) { const locales = [ ... args ] ; locales . forEach ( ( locale ) => { this . _translateService . setTranslation ( locale . lang , locale . data , true ) ; } ) ; } }