4

I have a reactjs app and I'm using react-table in it. The text of the table buttons ("Next", "Page x of y", etc) is in English and I did not see any option to localize it. Is there an API for this? Or should I hook the elements and implement it myself?

Liron Naim
  • 41
  • 5

1 Answers1

5

In the documentation you can find the list of strings that can be customized, and you can create an object of your custom translations:

const translations = {previousText: 'PREV', nextText: 'NEXT', loadingText: 'LOADING...'};

Next, just pass this object to your React Table jsx:

<ReactTable {...translations} />
Shai Givati
  • 1,106
  • 1
  • 10
  • 24