【问题标题】:Translating error messages Material-ui翻译错误信息 Material-ui
【发布时间】:2016-11-13 02:48:47
【问题描述】:

我有一个使用 Material-ui TextField 的表单,我正在翻译我的所有字段:

 <TextField autoFocus={true} name='formName'
                   placeholder={this.context.intl.formatMessage( translations.formNameInputPlaceholder )}
                   value={value || ''}
                   fullWidth={true}
                   errorText={ this.shouldShowError( fieldValidity ) ? <FormattedMessage { ...translations.notValid} /> : null }
                   onChange={ e => onChange( e.target.value ) }/>

然而 errorText 永远不会被翻译并继续使用默认语言环境。

【问题讨论】:

    标签: reactjs react-router material-ui


    【解决方案1】:

    好的,这个问题在 react 15.2.1 中解决了

    https://github.com/callemall/material-ui/issues/2494

    【讨论】:

      猜你喜欢
      • 2012-11-15
      • 2010-11-29
      • 1970-01-01
      • 2021-02-10
      • 2020-02-10
      • 2012-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多