'How to change button text language on protable filters in Ant Design Pro

I have a pro-table in ant design in which Ienter image description here want to apply filtering. However, the action buttons on the filters are always in Chinese as shown in the attached image. I want to change them to English. I would really appreciate any help.

Here is my code snippet:

const columns:ProColumns<GithubIssueItem>[]=[
       {      
        dataIndex: 'condition',
        title: 'Condition',
        ellipsis: true,
        // valueType: "select",
        filters: true,
        onFilter: true,
        valueEnum: {
          all: { text: "Okay", status: "Default" },
          open: {
            text: "unresolved",
            status: "Error",
          },
          closed: {
            text: "resolved",
            status: "Success",
            disabled: true,
          },
          processing: {
            text: "solving",
            status: "Processing",
          },
        },
      },
    ...
   ]


Solution 1:[1]

I just found a solution for ProTable locale of ant design pro. In your App.js:

  1. Import config locale of ant:
import {
  ConfigProvider
} from "antd";

import moment from "moment";

import enUS from "antd/lib/locale-provider/en_US";
  1. Wrap the ConfigProvider outside <YOUR_CONTENT/>:
        <ConfigProvider locale={enUS}>
         <YOUR_CONTENT/>
       </ConfigProvide>
  1. Add moment outside your App.js:
moment.locale("en");

The config provider of Ant Pro will auto change the Chinese language in every component you use of Ant Design Pro.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1