Override loadingRecords with internationalisation
Override loadingRecords with internationalisation
I'mm trying to customize ther loadingRecords option using also the json file for internationlisation but it's not owrking.
On my initialisation I set this code
"language": {
url: "assets/plugins/custom/datatables/i18n/" + uilang + ".json",
"loadingRecords": "<div><span class='spinner-border text-primary me-2'></span>Loading data....</div>",
},
but loadingRecords is overridden by the content oif the json file.
There is a way to use the json transalation and customize a loaginRecords option?
Answers
Sounds like the problem might be that the
language.url
file is being loaded asynchronously and the parameters being set by it are being applied after thelanguage.loadingRecords
option overwriting it. Looks like you are loading the file locally. Can you update the local file with the change you want to make?Kevin
Yes I had already changed the json file, but I wanted to understand if there was a way to proceed without intervening directly in the translation.
Thanks
Edika