added translations
This commit is contained in:
14
src/app/i18n/translate.pipe.ts
Normal file
14
src/app/i18n/translate.pipe.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Pipe, PipeTransform, inject } from '@angular/core';
|
||||
import { TranslateService } from './translate.service';
|
||||
|
||||
@Pipe({
|
||||
name: 'translate',
|
||||
pure: false,
|
||||
})
|
||||
export class TranslatePipe implements PipeTransform {
|
||||
private translateService = inject(TranslateService);
|
||||
|
||||
transform(key: string, params?: Record<string, string | number>): string {
|
||||
return this.translateService.t(key, params);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user