用react-intl做國際化的時候,All的時候可以用<FormattedMessage id="helloSomeone" tagName="div" }} /> 這么弄,這種lable=“指標”這種的時候怎么做國際化呢?<FormGroup label="指標" labelFor="text-input" className="bp3-form-group-30P"><div className="bp3-input-group bp3-select bp3-fill" fill="true">
<select name="status" defaultValue={-1} fill="true" onChange={event => this.onChangeValue(event)} > <option value="-1">All</option>
</select></div></FormGroup>
2 回答

FFIVE
TA貢獻1797條經驗 獲得超6個贊
<FormGroup label={intl.formatMessage({id: 'i18nid': defaultMessage: '指標'})} labelFor="text-input"className="bp3-form-group-30P">
<div className="bp3-input-group bp3-select bp3-fill" fill="true"> <select name="status" defaultValue={-1} fill="true" onChange={event => this.onChangeValue(event)} > <option value="-1"><FormattedMessage id={'i18nid'} defaultMessage="All"/></option> </select></div>
添加回答
舉報
0/150
提交
取消