【问题标题】:antd protable unable to change language to englishantd protable 无法将语言更改为英文
【发布时间】:2020-09-14 05:57:38
【问题描述】:

您好,我正在使用 antd protable 来显示数据,即使我将某些部分的默认语言定义为英语,它仍然显示中文

import ProTable, { IntlProvider, enUSIntl } from '@ant-design/pro-table';

  <IntlProvider value={enUSIntl}>
    <ProTable
     scroll={{ x: 1300 }}
     options={{ fullScreen: false, reload: true, setting: true }}
     request={allCustomers}
     columns={columns}
     />
   </IntlProvider>

除了分页信息外,其他的都是英文的变化。

请帮忙

【问题讨论】:

    标签: javascript reactjs antd ant-design-pro


    【解决方案1】:

    通过将 antd protable 版本更新到 2.3.1 解决了该问题

    编辑

    如果你还是无法通过将 antd protable 版本更新到 2.3.1 来解决它,试试这个

     <ProTable
    ...otherProps
     pagination={{
      showTotal: (total, range) => (
      <div>{`Showing ${range[0]}-${range[1]} of ${total} total items`}</div>     
         ),
           }}
    />
    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-20
      相关资源
      最近更新 更多