I store, in a session variable, which language does user wants to translate but I don't know to pass it DataTables
I found this explanation on the datatables website but that didn't really help, where do I set language param ?
I store, in a session variable, which language does user wants to translate but I don't know to pass it DataTables
I found this explanation on the datatables website but that didn't really help, where do I set language param ?
Also using a cdn:
More options: http://www.datatables.net/plug-ins/i18n/English [| Spanish | etc]
for Arabic language
Ref: https://datatables.net/plug-ins/i18n/Arabic
Author: Ossama Khayat
You have to either create a language file and then set it using :
Im not sure what server language you are using but something like this would work in PHP :
Where
language
matches the file name you for a specific language.or change individual settings :
For more details read this : http://datatables.net/plug-ins/i18n
sorry to revive this thread, i know there is the solution, but it is easy to change the language with the datatables. Here, i leave you with my own datatable example.
The language you get from the following link:
http://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n
Just replace the URL value in the language option with the one you like. Remember to always use the comma
Worked for me, hope it will work for anyone.
Best regards!
If you are using Angular and Firebase, you can also use the DTOptionsBuilder :
I hope this will help.
There are language files uploaded in a CDN, the dataTables web site has the list of the languages. So you would only have to replace "Spanish" with whatever language you are using in the following example.
https://datatables.net/plug-ins/i18n/Spanish