Name of message-name properties

4 posts, 1 answers
  1. Federico
    Federico avatar
    28 posts
    Member since:
    Sep 2017

    Posted 03 Oct Link to this post

    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.

  2. Dimitar
    Admin
    Dimitar avatar
    173 posts

    Posted 05 Oct Link to this post

    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.
  3. Federico
    Federico avatar
    28 posts
    Member since:
    Sep 2017

    Posted 09 Oct Link to this post

    Instead, if I want to put this message on all widgets, how should i do it?
  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    173 posts

    Posted 11 Oct Link to this post

    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.
Back to Top