How can i translate that la" /> How can i translate that la" /> How can i translate that la"/>

Mat-tab angular-localize proper way to translate

529 Views Asked by At

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?

1

There are 1 best solutions below

1
DEV On BEST ANSWER

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>