Configure editor to read i18n from file (ajax request)

Configure editor to read i18n from file (ajax request)

pyarzapyarza Posts: 4Questions: 3Answers: 0

Is it possible to make the editor extension load the internationalization strings from a remote file?

(Just like the DataTables does), or the internationalization has to be loaded externally (or hardcoded in the options of the editor instance).

Something like the following would be great:

editor = new $.fn.dataTable.Editor( { i18n: {"url":"editor.mylanguage.lang"}})

so we can have the same set of translation for several web pages

Thank you

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Currently there isn't an option for that - you need to make an Ajax call to the server yourself and then simply use the data returned as the language strings in the normal configuration way.

    I will look at adding this as a feature to future versions of Editor.

    Thanks,
    Allan

  • pyarzapyarza Posts: 4Questions: 3Answers: 0

    Ok. That was what I had in mind. Thanks for your prompt reply Allan

  • MbdesignMbdesign Posts: 17Questions: 0Answers: 0

    is it no chance to include a lang file in the Editor by url like this

    i18n: {
    "url": "../de_DE_editor.txt"
    },

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Hi,

    I just sent you a PM about about an hour ago actually - before I saw your question here. Currently no, there is no option to include a language translation via Ajax by Editor automatically. You would need to make the Ajax call yourself and pass the information in through the initialisation options.

    Allan

  • phikuphiku Posts: 8Questions: 2Answers: 0

    Did you solve this ?

This discussion has been closed.