Url Language data attribute

Url Language data attribute

jovendigitaljovendigital Posts: 3Questions: 1Answers: 0

Hi, I'm trying to get the translation from an external JSON with that:

data-language='{"url":"/assets/datatable_ES.json"}'

¿Why it doesn't work?

thanks

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    What debugging have you done? Are you seeing any errors? Does that file actually exist in that location?

  • jovendigitaljovendigital Posts: 3Questions: 1Answers: 0

    It is not trying to load anything by ajax. Yes, the file exists, and it does not give any error

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Seems to work okay here. I'd need a link to a test page showing the issue, as required in the forum rules, to be able to offer any help.

    Allan

  • jovendigitaljovendigital Posts: 3Questions: 1Answers: 0

    mmm, the url has to be absolute? I think is for that. Now works, thanks!

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    No it doesn't. It does in that case since the live.datatables.net domain doesn't have that resource available under it, but for DataTables itself, it doesn't matter where the file is, as long as it can read it.

    Allan

This discussion has been closed.