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

定义文化

每个区域性的信息放在一个单独的JavaScript文件中,并共享kendo.culture。<语言代码>[-<国家/地区代码>].js命名约定。

您可以包含任意数量的区域性文件。包含的每个文件都扩展kendo.cultures映射。请注意,所包含的区域性文件不会自动成为Kendo UI使用的当前区域性。有关如何设置不同文化的更多信息,请查看这一部分来自概述文章

应用默认区域性

中直接定义默认的英语文化kendo.core.js以…的名义“en - us”

下面的示例列出了默认区域性信息。

kendo.cultures["en-US"] = { // - name: "en-US", // The "numberFormat" defines general number formatting rules. numberFormat: { //numberFormat has only negative pattern unlike the percent and currency //negative pattern: one of (n)|-n|- n|n-|n - pattern: ["-n"], //number of decimal places decimals: 2, //string that separates the number groups (1,000,000) ",": ",", // A string that separates a number from the fractional point. ".": ".", //the length of each number group groupSize: [3], //formatting rules for percent number percent: { //[negative pattern, positive pattern] // negativePattern: one of -n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- % //positivePattern: one of n %|n%|%n|% n pattern: ["-n %", "n %"], // The number of decimal places. decimals: 2, // The string that separates the number groups (1,000,000 %). ",": ",", // The string that separates a number from the fractional point. ".": ".", // The length of each number group. groupSize: [3], //percent symbol symbol: "%" }, currency: { // [negative pattern, positive pattern] // negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)" //positivePattern: one of "$n|n$|$ n|n $" pattern: ["($n)", "$n"], // The number of decimal places. decimals: 2, // The string that separates the number groups (1,000,000 $). ",": ",", // The string that separates a number from the fractional point. ".": ".", // The length of each number group. groupSize: [3], // The currency symbol. symbol: "$" } }, calendars: { standard: { days: { // The full day names. names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // The abbreviated day names. namesAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // The shortest day names. namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ] }, months: { // The full month names. names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], // abbreviated month names namesAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] }, // The AM and PM designators. // [standard,lowercase,uppercase] AM: [ "AM", "am", "AM" ], PM: [ "PM", "pm", "PM" ], // The set of predefined date and time patterns used by the culture. patterns: { d: "M/d/yyyy", D: "dddd, MMMM dd, yyyy", F: "dddd, MMMM dd, yyyy h:mm:ss tt", g: "M/d/yyyy h:mm tt", G: "M/d/yyyy h:mm:ss tt", m: "MMMM dd", M: "MMMM dd", s: "yyyy'-'MM'-'ddTHH':'mm':'ss", t: "h:mm tt", T: "h:mm:ss tt", u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", y: "MMMM, yyyy", Y: "MMMM, yyyy" }, // The first day of the week (0 = Sunday, 1 = Monday, and so on). firstDay: 0 } } };

扩展文化信息

在每个区域性的脚本源代码中,每个脚本只是将区域性信息对象添加到kendo.cultures映射。来定义自己的区域性文件并扩展当前的kendo.cultures映射,遵循前面列出的默认区域性信息的结构。

另请参阅

在本文中
Baidu
map