export const MultiLingualData = new ( class { private data : { [ key ] : any ; } = { } ; private listners : { [ key ] : Function ; } = { } ; private incrementCount : number = 0 ; current : { [ key ] : any ; } = { } ; addOrUpdate ( key , data ) { this . current = this . data [ key ] = data ; } isExits ( key ) { return this . data [ key ] !== undefined ; } get ( path ) { if ( ! this . data ) return ; var currentObject = this . data ; let props = path . split ( "." ) ; for ( let prop of props ) { currentObject = currentObject [ prop ] ; if ( currentObject === undefined ) break ; } return currentObject === undefined ? '' : currentObject ; } subscribe ( func ) { this . incrementCount = this . incrementCount + 1 ; this . listners [ this . incrementCount ] = func ; return this . incrementCount ; } unsubscribe ( key ) { delete this . listners [ key ] ; } } ) ;