Hi, we have a multilanguage application and we need to change the Kendo UI for Vue language dynamically.
Currently, we were doing it like this and it worked:
var that = this;
var selectedLang = this.$refs.dl.kendoWidget().value();
$.getScript("https://kendo.cdn.telerik.com/2018.3.1017/js/messages/kendo.messages." + selectedLang + ".min.js", function() {
var lb = that.$refs.lb.kendoWidget();
lb.setOptions({
messages: kendo.ui.ListBox.fn.options.messages
});
});
But we need the script to grab it locally for possible own modifications. I am trying this way :
var that = this;
var script = document.createElement('script');
script.src = "../../../../storage/kendo-grid/messages/kendo.messages." +selectedLang+ ".min.js";
if(document.head){
document.head.appendChild(script);
var lb = that.$refs[ref].kendoWidget();
lb.setOptions({
messages: kendo.ui.ListBox.fn.options.messages
});
}
But it gives me a javascript error when pointing to the script ('Module is not defined').
Could you guide me a bit? Thanks!