import { Pipe, PipeTransform } from '@angular/core';
import { TranslatorService } from '../../services/translator/translator.service';

@Pipe({
  name: 'translate'
})
export class TranslatePipe implements PipeTransform {

  constructor(public translator: TranslatorService) {

  }
  transform(value: string, arg1?: any): any {
    if (value) {
      return this.translator.trInline(value);
    }
    return '';
  }

}
