Configure editor to read i18n from file (ajax request)
Configure editor to read i18n from file (ajax request)
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
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
Ok. That was what I had in mind. Thanks for your prompt reply Allan
is it no chance to include a lang file in the Editor by url like this
i18n: {
"url": "../de_DE_editor.txt"
},
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
Did you solve this ?