Datatables Editor Translation

Datatables Editor Translation

IRC AUTOMATIZACIONIRC AUTOMATIZACION Posts: 2Questions: 1Answers: 0

I bought Datatables Editor license a couple of weeks ago, I'm trying to translate Datatables Editor, but it doesn't have the "url" property in his "i18n" (property where datatables editor language is defined), meaning that I need to copy the 36 lines of code of the translation into every Editor definition in my project. That translate into around 1000 lines of duplicated code in this project.

Could you provide me some support with the translation? Thank you in advance

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    Hi @IRC AUTOMATIZACION ,

    This SO thread gives a good suggestion on how to do this. If no joy, please reply back,

    Cheers,

    Colin

  • IRC AUTOMATIZACIONIRC AUTOMATIZACION Posts: 2Questions: 1Answers: 0
    edited December 2018

    That could work, thanks. The perfect thing would be to have a language: { url: "{path-to-json}" like we have in Datatables, but that could fix the problem.

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Part of the issue with that is that Editor's initialisation is synchronous, while Ajax loading language data would make it async. For example, this would be a problem when using the Buttons library for the Create / Edit / Delete buttons which need their strings when displayed (otherwise the default would be displayed initially).

    I agree, this would be a good addition, and it is something we will look into further, but there are potential issues along the way.

    Thanks,
    Allan

This discussion has been closed.