原創|使用教程|編輯:龔雪|2013-11-06 10:49:26.000|閱讀 3057 次
概述:Kendo UI Web包含數百個創建HTML5 web app的必備元素,包括UI組件、數據源、驗證、一個MVVM框架、主題、模板等。為了使得產品可以符合不同市場的本地化需求和語言,Kendo UI中的網格控件提供了一種方法,來幫助用戶通過使用配置選項來本地化用戶的界面。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Kendo UI Web包含數百個創建HTML5 web app的必備元素,包括UI組件、數據源、驗證、一個MVVM框架、主題、模板等。
為了使得產品可以符合不同市場的本地化需求和語言,Kendo UI中的網格控件提供了一種方法,來幫助用戶通過使用配置選項來本地化用戶的界面。
工具欄控件的本地化
toolbar: [ //name - name of the available commands, text - text to be set on the button { name: "create", text: "Custom Create" }, { name: "save", text: "Custom Save" }, { name: "cancel", text: "Custom Cancel" } ]
列命令的本地化
columns: [ { field: "FirstName", title: "First Name" }, { field: "LastName", title: "Last Name" }, { command: [ { name: "edit", text: { // sets the text of the "Edit", "Update" and "Cancel" buttons edit: "CustomEdit", update: "CustomUpdate", cancel: "CustomCancel" } }, { name: "destroy", text: "CustomDelete" } // sets the text of the "Delete" button ], title: " " } ]
過濾器菜單本地化
filterable: { messages: { info: "Custom header text:", // sets the text on top of the filter menu filter: "CustomFilter", // sets the text for the "Filter" button clear: "CustomClear", // sets the text for the "Clear" button // when filtering boolean numbers isTrue: "custom is true", // sets the text for "isTrue" radio button isFalse: "custom is false", // sets the text for "isFalse" radio button //changes the text of the "And" and "Or" of the filter menu and: "CustomAnd", or: "CustomOr" }, operators: { //filter menu for "string" type columns string: { eq: "Custom Equal to", neq: "Custom Not equal to", startswith: "Custom Starts with", contains: "Custom Contains", endswith: "Custom Ends with" }, //filter menu for "number" type columns number: { eq: "Custom Equal to", neq: "Custom Not equal to", gte: "Custom Is greater than or equal to", gt: "Custom Is greater than", lte: "Custom Is less than or equal to", lt: "Custom Is less than" }, //filter menu for "date" type columns date: { eq: "Custom Equal to", neq: "Custom Not equal to", gte: "Custom Is after or equal to", gt: "Custom Is after", lte: "Custom Is before or equal to", lt: "Custom Is before" }, //filter menu for foreign key values enums: { eq: "custom Is Equal to", neq: "custom Is Not equal to" } } }
組頭本地化
groupable: { messages: { empty: "Custom message text" } }
列菜單本地化
columnMenu: { messages: { sortAscending: "Sort Ascending", sortDescending: "Sort Descending", filter: "Filter", columns: "Columns" } }
頁面本地化
pageable: { messages: { display: "{0} - {1} of {2} items", //{0} is the index of the first record on the page, {1} - index of the last record on the page, {2} is the total amount of records empty: "No items to display", page: "Page", of: "of {0}", //{0} is total amount of pages itemsPerPage: "items per page", first: "Go to the first page", previous: "Go to the previous page", next: "Go to the next page", last: "Go to the last page", refresh: "Refresh" } }
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件