How to translate the default value in p-multiselect

2.2k Views Asked by At

I am using angular 4 for my web application.Here i want to translate the defaultlabel value of multiselect dropdown.Below format is not working properly. Can anyone help me to sort out this?

.ts

import { TranslateService } from '@ngx-translate/core';

.html

<div>
   <p-multiSelect [options]="person" formControlName="ExeUser" 
    defaultLabel="{{'CHOOSE' | translate}}"></p-multiSelect>
</div>
1

There are 1 best solutions below

1
On

I think you can set defaultLabel as an input for the multi-select component. Example:

<div>
   <p-multiSelect [options]="person" formControlName="ExeUser" 
    [defaultLabel]="'CHOOSE' | translate"></p-multiSelect>
</div>