import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ( { name : 'findLanguageFromKey' } ) export class FindLanguageFromKeyPipe implements PipeTransform { private languages : any = { en : { name : 'English' } } ; transform ( lang ) { return this . languages [ lang ] . name ; } }