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

Name of message-name properties

3 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 03 Oct 2017, 12:54 PM

i have external localization file for dropdownlist.

/* DropDownList messages */

if (kendo.ui.DropDownList) {
kendo.ui.DropDownList.prototype.options.messages =
$.extend(true, kendo.ui.DropDownList.prototype.options.messages,{
  "<message-name>": "<translation",
  noDataFound:"ciao"
});
}

 

noDataFuond is definitely wrong.

What should I write to set the no-data parameter of dropdownlist? 

Then i used the template to set this properties, but now i'd like to create external file for this message.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 05 Oct 2017, 07:57 AM
Hello Frederico,

You can localize the DropDownList's noDataTemplate configuration option by the following code:
<script>
  kendo.ui.DropDownList.prototype.options =
    $.extend(true, kendo.ui.DropDownList.prototype.options,{
      noDataTemplate:"ciao"
  });
</script>

If you  would like to add localization for your language, you can fork our repository, apply the respective changes, and submit a pull request. Else, you can place the above code in a custom script file, which you can load in your document. 

Additional information can be found in the links below:


Regards,
Dimitar
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.
0
Federico
Top achievements
Rank 1
answered on 09 Oct 2017, 10:34 AM
Instead, if I want to put this message on all widgets, how should i do it?
0
Accepted
Dimitar
Telerik team
answered on 11 Oct 2017, 06:51 AM
Hello Frederico,

The code sample provided in my last reply will apply the localization for every DropDownList widget that is being created. 

Localization can be applied to the rest of the select widgets that support noDataTemplate (AutoComplete, MultiSelect, ComboBox) in the same manner:
<script>
  kendo.ui.ComboBox.prototype.options =
    $.extend(true, kendo.ui.ComboBox.prototype.options,{
      noDataTemplate:"ciao"
  });
 
  ...
</script>


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