admin管理员组

文章数量:1336008

how can I change the text inside the ant design pagination select? there's no solution in the documents,

I need to change the word "page" to something else:

how can I change the text inside the ant design pagination select? there's no solution in the documents,

I need to change the word "page" to something else:

Share Improve this question asked Jan 6, 2021 at 0:09 Sima GhoreyshiSima Ghoreyshi 4278 silver badges23 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 9

I try this solution and it works.

<Pagination
    defaultCurrent={1}
    total={50}
    locale={{ items_per_page: "/ หน้า"}}
/>

After searching almost everywhere, I came to this conclusion that there's not a normal way to change the default words.

For changing the language there's the locale option, and in the files defined for locale we can change the default words, which is an unusual thing to do but not impossible!

pagination={{
      locale: {
        items_per_page: intl.formatMessage({ id: "mon-table-per-page" }),
      },
    }}

本文标签: javascriptANTD how to change the text inside the pagination select boxStack Overflow