jQuery的剑道UI免费下载30天试用版

本地化

Grid通过利用可用的配置选项提供了本地化其用户界面的选项。

工具栏的信息

下面的示例演示如何在网格中实现工具栏消息的转换。有关更多信息,请参阅工具栏API参考。

工具栏:[// name]是可用命令的名称。// text是将被设置为按钮的文本。{name: "create", text: "Custom create"}, {name: "save", text: "Custom save"}, {name: "cancel", text: "Custom cancel"}]

下面的示例演示如何在Grid中实现列菜单的消息转换。有关更多信息,请参阅columnMenu.messagesAPI参考。

columnMenu: {messages: {sortAscending: "Sort Ascending", sortdescent: "Sort Descending", filter: " filter ", columns: " columns "}}

命令消息

下面的示例演示如何在网格中实现列命令消息的转换。有关更多信息,请参阅columns.commandAPI参考。

columns: [{field: "FirstName", title: "FirstName"}, {field: "LastName", title: "LastName"}, {command: [{Name: "edit", text:{//设置"edit", "Update"和"Cancel"按钮的文本。edit: "CustomEdit", update: "CustomUpdate", cancel: "CustomCancel"}}, {name: "destroy", text: "CustomDelete"} //设置删除按钮的文本。],标题:“ ”})

过滤消息

下面的示例演示如何在网格中实现过滤器菜单和操作符消息的转换。有关更多信息,请参阅滤过性的API参考。

filterable: {messages: {info: "Custom header text:", //设置Filter菜单顶部的文本。filter: "CustomFilter", //设置过滤器按钮的文本。clear: "CustomClear", //设置清除按钮的文本。//当过滤布尔值时。itrue: "custom is true", //设置" itrue "单选按钮的文本。isFalse: "custom is false", //为"isFalse"单选按钮设置文本。//更改Filter菜单中的And和Or的文本。和:"CustomAnd",或:"CustomOr"},操作符:{//“字符串”类型列的过滤菜单。string: {eq: "Custom Equal to", neq: "Custom Not Equal to", startswith: "Custom Starts with", contains: "Custom contains ", endswith: "Custom Ends with"}, //“number”类型列的过滤菜单。number: {eq: "自定义等于",neq: "自定义不等于",gte: "自定义大于等于",gt: "自定义大于",lte: "自定义小于等于",lt: "自定义小于"},//日期类型列的过滤菜单。 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" }, // The filter menu for foreign key values. enums: { eq: "custom Is Equal to", neq: "custom Is Not equal to" } } }

分组报头消息

下面的示例演示如何在网格中实现组标头消息的转换。有关更多信息,请参阅groupable.messagesAPI参考。

groupable: {messages: {empty: "自定义消息文本"}}

寻呼消息

下面的示例演示如何在网格中实现寻呼机消息的翻译。有关更多信息,请参阅消息API参考。

Pageable: {messages: {display: "{0} - {1} of {2} items", //{0}是该页上第一条记录的索引,{1}-该页上最后一条记录的索引,{2}是该页上记录的总数。empty: "No items to display", page: " page ", allPages: "All", of: "of{0}", //{0}为页面总数。itemsPerPage: "每页项数",first: "Go to first page", previous: "Go to上一页",next: "Go to next page", last: "Go to the last page", refresh: " refresh "}

例子

下面的示例演示了一个具有本地化用户界面的Grid,用于上面列出的所有配置选项。

另请参阅

在本文中
Baidu
map