import { Pipe , PipeTransform } from '@angular/core' ; import { Language } from '@data/poe/schema' ; import { WordService } from './word.service' ; @ Pipe ( { name : 'word' } ) export class WordPipe implements PipeTransform { constructor ( private readonly wordService ) { } public transform ( value , language ) { return this . wordService . translate ( value , language ) ; } }