Home > Enterprise >  Mat-tab angular-localize proper way to translate
Mat-tab angular-localize proper way to translate

Time:11-11

Lets say i have mat tam created like this

<mat-tab-group>
    <mat-tab label="nameToBeTranslated">
    </mat-tab>
</mat-tab-group>

How can i translate that label?

CodePudding user response:

You can use :

<mat-tab-group>
    <mat-tab label="{{'nameToBeTranslated' | translate}}">
    </mat-tab>
</mat-tab-group>

or

<mat-tab-group>
    <mat-tab [label]=" 'now you can use pipes here' | anyPipeForTranslation">
    </mat-tab>
</mat-tab-group>
  • Related