如果使用ngx-translate,您可以执行以下操作:
<ion-select formControlName="myControl" [okText]="'okText' | translate" [cancelText]="'cancelText' | translate"></ion-select>
Run Code Online (Sandbox Code Playgroud)
在翻译文件中,例如 en.json
{
"okText": "OK",
"cancelText": "Cancel"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2035 次 |
| 最近记录: |