This is a migrated thread and some comments may be shown as answers.

How to create external localization file message for dropdownlist

4 Answers 236 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 03 Oct 2017, 10:29 AM

I'd like to create a new external file for custom message to show a message.

This message will show when datasource is empty.

This is a message for: data-no-data-template="NoDataFoundTemplate"

I have created a new file:"kendo.message-noDataCustomMessage" .

this is my file:

/* <Widget-name> messages */

if (kendo.ui.<Widget-name>) {
kendo.ui.<Widget-name>.prototype.options.messages =
$.extend(true, kendo.ui.<Widget-name>.prototype.options.messages,{
  "<message-name>": "<translation",
  noDataFound:"Nessun Elemento Trovato"
  //...
});
}

 

 

4 Answers, 1 is accepted

Sort by
0
Federico
Top achievements
Rank 1
answered on 03 Oct 2017, 10:41 AM

What should I write instead of<widget-name>?

and with <message-name>?

how include this rules in the dropdownlist of my project?
0
Federico
Top achievements
Rank 1
answered on 03 Oct 2017, 10:43 AM

How i should write instead of <widget-name>?
and with <message-name>?
how include this rules in the my dorpdownlist of my project?
0
Federico
Top achievements
Rank 1
answered on 03 Oct 2017, 10:43 AM

How i should write instead of <widget-name>?
and with <message-name>?
how include this rules in the my dorpdownlist of my project?
0
Accepted
Ivan Danchev
Telerik team
answered on 05 Oct 2017, 08:04 AM
Hi Federico,

Here's a dojo example, which shows how you can extend the DropDownList and customize the noDataTemplate text. If you want to use an external js file this is the logic responsible for changing the text that you need to add to the file:
(function ($) {
  var CustomDropDownList = window.kendo.ui.DropDownList.extend({
    options: {
      noDataTemplate: "Nessun Elemento Trovato"
    }
  });
  window.kendo.ui.plugin(CustomDropDownList);
})(jQuery);


Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
DropDownList
Asked by
Federico
Top achievements
Rank 1
Answers by
Federico
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or