Override loadingRecords with internationalisation

Override loadingRecords with internationalisation

edikaedika Posts: 14Questions: 7Answers: 0

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?


  • kthorngrenkthorngren Posts: 17,704Questions: 25Answers: 4,199

    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 the language.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?


  • edikaedika Posts: 14Questions: 7Answers: 0

    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.



Sign In or Register to comment.