mirror of https://github.com/layui/layui
wip(i18n): update
parent
2ad09cb3fc
commit
e51d5da00f
22
src/layui.js
22
src/layui.js
|
@ -13,17 +13,21 @@
|
||||||
|
|
||||||
var zhCn = {
|
var zhCn = {
|
||||||
locale: 'zh-cn',
|
locale: 'zh-cn',
|
||||||
|
lay: {
|
||||||
|
common: {
|
||||||
|
placeholder: '请选择'
|
||||||
|
},
|
||||||
colorpicker: {
|
colorpicker: {
|
||||||
clear: '清除',
|
clear: '清除',
|
||||||
confirm: '确定',
|
confirm: '确定'
|
||||||
},
|
},
|
||||||
/** 未使用的字段为保留字段,将来可能会使用 */
|
// 未使用的字段为保留字段,将来可能会使用
|
||||||
laydate: {
|
laydate: {
|
||||||
month: {
|
month: {
|
||||||
long: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
long: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||||
short: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
|
short: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二']
|
||||||
},
|
},
|
||||||
week:{
|
week: {
|
||||||
long: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
long: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||||
short: ['日', '一', '二', '三', '四', '五', '六']
|
short: ['日', '一', '二', '三', '四', '五', '六']
|
||||||
},
|
},
|
||||||
|
@ -45,12 +49,13 @@
|
||||||
invalidDate: '不在有效日期或时间范围内',
|
invalidDate: '不在有效日期或时间范围内',
|
||||||
formatError: ['日期格式不合法<br>必须遵循下述格式:<br>', '<br>已为你重置'],
|
formatError: ['日期格式不合法<br>必须遵循下述格式:<br>', '<br>已为你重置'],
|
||||||
preview: '当前选中的结果',
|
preview: '当前选中的结果',
|
||||||
|
// IE11- Date.prototype.toLocaleDateString 不支持第二个参数,所以此处用函数实现
|
||||||
panelHeaderFormat: {
|
panelHeaderFormat: {
|
||||||
year: function(y){return y + ' 年'},
|
year: function (y) { return y + ' 年' },
|
||||||
month: function(m){return m + ' 月'},
|
month: function (m) { return m + ' 月' },
|
||||||
monthBeforeYear: false
|
monthBeforeYear: false
|
||||||
},
|
},
|
||||||
/** 面板中某些字符串拼接使用 */
|
// 面板中某些字符串拼接使用
|
||||||
view: {
|
view: {
|
||||||
year: '年',
|
year: '年',
|
||||||
month: '月',
|
month: '月',
|
||||||
|
@ -70,6 +75,7 @@
|
||||||
confirm: '确定'
|
confirm: '确定'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// 基础配置
|
// 基础配置
|
||||||
var config = {
|
var config = {
|
||||||
timeout: 10, // 符合规范的模块请求最长等待秒数
|
timeout: 10, // 符合规范的模块请求最长等待秒数
|
||||||
|
@ -78,9 +84,7 @@
|
||||||
i18n:{
|
i18n:{
|
||||||
locale: 'zh-cn', // 设置全局配置的语言
|
locale: 'zh-cn', // 设置全局配置的语言
|
||||||
messages: { // 全局国际化消息对象,格式为:{locale: {namespace:{component:{...}}}}
|
messages: { // 全局国际化消息对象,格式为:{locale: {namespace:{component:{...}}}}
|
||||||
'zh-cn': {
|
'zh-cn': zhCn
|
||||||
lay: zhCn // layui 使用 `lay` 命名空间,外部自定义模块应使用自定义命名空间
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue