Override loadingRecords with internationalisation

Override loadingRecords with internationalisation

edikaedika Posts: 20Questions: 9Answers: 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?

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    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?

    Kevin

  • edikaedika Posts: 20Questions: 9Answers: 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.

    Thanks

    Edika

Sign In or Register to comment.