ant-design/components/popconfirm/demo/locale.md

28 lines
454 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
2016-10-14 21:45:48 +08:00
order: 1
title:
zh-CN: 国际化
2016-10-07 15:33:04 +08:00
en-US: Locale text
2016-03-31 09:40:55 +08:00
---
2015-11-24 11:21:37 +08:00
## zh-CN
2016-10-07 15:33:04 +08:00
使用 `okText``cancelText` 自定义按钮文字。
2015-11-24 11:21:37 +08:00
## en-US
2018-04-25 21:59:14 +08:00
Set `okText` and `cancelText` props to customize the button's labels.
```tsx
2015-11-24 11:21:37 +08:00
import { Popconfirm } from 'antd';
2022-05-21 22:14:15 +08:00
import React from 'react';
2015-11-24 11:21:37 +08:00
const App: React.FC = () => (
2015-11-24 11:21:37 +08:00
<Popconfirm title="Are you sure" okText="Yes" cancelText="No">
2015-11-26 12:07:27 +08:00
<a href="#">Delete</a>
</Popconfirm>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```