--- order: 6 title: zh-CN: 国际化 en-US: Internationalization --- ## zh-CN 设置 `okText` 与 `cancelText` 以自定义按钮文字。 ## en-US To customize the text of the buttons, you need to set `okText` and `cancelText` props. ```jsx import { Modal, Button, Space } from 'antd'; import { ExclamationCircleOutlined } from '@ant-design/icons'; class LocalizedModal extends React.Component { state = { visible: false }; showModal = () => { this.setState({ visible: true, }); }; hideModal = () => { this.setState({ visible: false, }); }; render() { return ( <>

Bla bla ...

Bla bla ...

Bla bla ...

); } } function confirm() { Modal.confirm({ title: 'Confirm', icon: , content: 'Bla bla ...', okText: '确认', cancelText: '取消', }); } export default () => ( ); ```