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

TreeList kendo.messages.ja-JP.min.js doesn't work

1 Answer 114 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Oct 2018, 09:04 AM

Hi

I try to change widget language follow the document   TreeList / Localization ( https://demos.telerik.com/kendo-ui/treelist/localization ) .

Success in  kendo.messages.en-US.min.js ,kendo.messages.zh-CN.min.js , kendo.messages.zh-TW.min.js ,

but kendo.messages.ja-JP.min.js doesn't work  , it will show english  not  Japanese.

I check network  package  , server   return kendo.messages.ja-JP.min.js  content is correct

 

Also  the document demo (TreeList / Localization )  have same issue in  kendo.messages.ja-JP.min.js.

Did i miss something or kendo.messages.ja-JP.min.js something wrong.

Kendo UI version :2018.2.620

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 11 Oct 2018, 09:07 AM
Hi Ryan,

This behavior is observed because the messages file for the ja-JP culture has missing messages. You can find the non-minified file here:
https://github.com/telerik/kendo-ui-core/blob/master/src/messages/kendo.messages.ja-JP.js

See that there are no translations for TreeList.prototype.options.messages. Not all messages files are complete and contributions from the community are welcome. You can find more information here: Contribution.

If you need a quick fix, you can copy the command and editable messages from the Grid. To do this, put the following script in the page before creating the TreeList:
<script>
  if (kendo.ui.TreeList) {
    kendo.ui.TreeList.prototype.options.messages =
      $.extend(true, kendo.ui.TreeList.prototype.options.messages,{
      "commands": {
        "cancel": "変更のキャンセル",
        "canceledit": "キャンセル",
        "create": "新規レコードを追加",
        "destroy": "削除",
        "edit": "編集",
        "excel": "Export to Excel",
        "pdf": "Export to PDF",
        "save": "変更の保存",
        "select": "選択",
        "update": "更新"
      },
      "editable": {
        "cancelDelete": "キャンセル",
        "confirmation": "このレコードを本当に削除しますか?",
        "confirmDelete": "削除"
      }
    });
  }
</script>

You can see the result here:
https://dojo.telerik.com/OnEruJom

Regards,
Tsvetina
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
TreeList
Asked by
Ryan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or