怎么设置页面效果为简体中文,即所有的提示框都是中文【确定/取消】而非【YES/NO】,包括pagingTollBar等
引入国际化文件这个是3.x的做法
4.0的这个不起作用
导入中文处理js
[code="java"]
PagingToolbar = Ext.extend(Ext.PagingToolbar, {
constructor: function(store, pageSize){
PagingToolbar.superclass.constructor.call(this, {
store: store,
pageSize: pageSize, //页面大小
displayInfo: true,
displayMsg : '共 {2} 条记录,当前页记录索引 {0} - {1} ',
emptyMsg: '没有数据',
refreshText: '刷新',
firstText: '第一页',
prevText: '前一页',
nextText: '下一页',
lastText: '最后一页'
})
}
})
/**
Ext.Msg.confirm = function(title, msg, fn){
this.show({
title: title,
msg: msg,
fn: fn,
buttons: {
yes: '确定',
no: '取消'
}
//multiline: true 多行输入
});
return this;
}
Ext.Msg.alert = function(title, msg, fn){
this.show({
title: title,
msg: msg,
fn: fn,
buttons: {
yes: '确定'
}
});
return this;
};
[/code]
:lol:
要修改ext-lang-zh_CN.js文件
去掉 Ext.onRead
[url]
//Ext.onReady(function(){
if(Ext.Updater){
...
//});
[/url]
详细见
http://www.iteye.com/problems/67114
导入ext-lang-zh_CN.js
if(Ext.MessageBox){
Ext.MessageBox.buttonText = {
ok : "确定",
cancel : "取消",
yes : "是",
no : "否"
};
}
.....