import { TranslateService } from '@ngx-translate/core' ; export interface ILocale { lang : string ; data : Object ; } export abstract class I18nService { public translate : TranslateService ; public loadTranslations ( ... args ) { const locales = [ ... args ] ; locales . forEach ( ( locale ) => { this . translate . setTranslation ( locale . lang , locale . data , true ) ; } ) ; } }