admin管理员组文章数量:1403136
I want the ant design (React) pagination to be in my language (spanish). The ideal thing would be to render "por página" instead of "page" in the next picture:
(code)
pagination={{ defaultPageSize: 3, showSizeChanger: true, pageSizeOptions: ['5','10', '20', '30']}}
(picture)
Thanks!
I want the ant design (React) pagination to be in my language (spanish). The ideal thing would be to render "por página" instead of "page" in the next picture:
(code)
pagination={{ defaultPageSize: 3, showSizeChanger: true, pageSizeOptions: ['5','10', '20', '30']}}
(picture)
Thanks!
Share Improve this question edited Mar 22, 2020 at 15:53 keikai 15.2k10 gold badges55 silver badges72 bronze badges asked Mar 22, 2020 at 15:02 Sven BrodersenSven Brodersen 871 silver badge7 bronze badges 1- mmmm not exactly, my goal is to personalize the text, but thanks man – Sven Brodersen Commented Mar 22, 2020 at 15:15
1 Answer
Reset to default 5Explanation
This is often so called i18n
or internationalization
And Ant does have an Internationalization solution provided.
Refer to document ant i18n, you can find the language list there.
Demo
- for example: In spanish
Usage
import { ConfigProvider } from 'antd';
import es_ES from 'antd/es/locale/es_ES';
return (
<ConfigProvider locale={es_ES}>
<App />
</ConfigProvider>
);
Try it online:
本文标签: javascriptHow to change ANTD table text to different languageStack Overflow
版权声明:本文标题:javascript - How to change ANTD table text to different language - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744384243a2603658.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论