import { EventEmitter , Injectable } from '@angular/core' ; import { DefaultLangChangeEvent , LangChangeEvent , TranslationChangeEvent } from '@ngx-translate/core' ; import { EMPTY , Observable , of } from 'rxjs' ; @ Injectable ( ) export class ObMockTranslateService { translations : any ; onLangChange = new EventEmitter < LangChangeEvent > ( ) ; onTranslationChange = new EventEmitter < TranslationChangeEvent > ( ) ; onDefaultLangChange = new EventEmitter < DefaultLangChangeEvent > ( ) ; defaultLang = 'en' ; langs = [ 'en' ] ; currentLang = 'en' ; setTranslation ( lang , translations , shouldMerge = false ) { } getStreamOnTranslationChange ( key , interpolateParams ? ) { return EMPTY ; } stream ( key , interpolateParams ? ) { return EMPTY ; } getBrowserLang ( ) { return 'en' ; } getDefaultLang ( ) { return 'en' ; } setDefaultLang ( lang ) { } get ( key , interpolateParams ? ) { return of ( typeof key === 'string' ? key : key . map ( str => ( { [ str ] : str } ) ) ) ; } use ( lang ) { return of ( '' ) ; } instant ( string ) { return string ; } getTranslation ( lang ) { return of ( '' ) ; } getLangs ( ) { return this . langs ; } addLangs ( langs ) { this . langs = langs ; } getParsedResult ( translations , key , interpolateParams ? ) { return '' ; } set ( key , value , lang ? ) { } reloadLang ( lang ) { return of ( '' ) ; } resetLang ( lang ) { } getBrowserCultureLang ( ) { return 'en' ; } }