html5 web app开发教程,HTML5 Web app开发工具Kendo UI Web教程:Grid网格控件本地化

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"

}

}

慧都特邀Kendo UI原厂开发工程师举行线上公开课,使用该控件的朋友千万别错过哦>>查看详情

9d3c3af09875ef0ad82422d11d39c2e2.png

标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至hey@evget.com

文章转载自:慧都控件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值