Hello Reader, If you are using data tables in your web website and want to change default message of it then in this blog you can see how to change them.
Now-a-days, Data tables are getting very popular because of its real-time instant searching, sorting and filtering functionality. Data tables come with their default messages like, detail of number of records, searching and pagination counting. Now we will change these messages and put our message so let's get started doing this:-
The following example will also work for multilingual website where you can put two message in to different language
Step1:- Create a new data table and give it a ID, It's html code will go like this:-
In code above we have created and simple table in html and created it's header and body. In the body you can print as much as records you want to show.
Step2:- Second we will create our custom messages which will replace data tables custom messages and show for both the English and Arabic language. This will define inside an array and it's code will go like this:-
In the code above we have declare two key (English and Arabic) for every custom messages. This message will have your own messages. For example default message for no records of data table is "No records is to display" and you can see we have replace this line by "No data available in table" in english.