Recently in the study Easyui, wrote some interface;
In the grid table Datagrid-filter encountered a data filtering operation, a lot of customers are bad English, how to do it. This requires the programmer to be Chinese.
First, let's take a look at what the source code under Easyui is like. As shown below,
In fact, the Han is very simple, the great god please sneak through it, rookie can see.
1, this grid of the DataGrid is required datagrid-filter.js, this JS can be downloaded on the Easyui official website.
2, only need to add the following code inside the Locale/easyui-lang-zh_cn.js.
if ($.fn.datagrid && $.fn.datagrid.defaults && $.fn.datagrid.defaults.operators.nofilter) {
$.fn.datagrid.defaults.operators.nofilter.text = "None";
$.fn.datagrid.defaults.operators.contains.text = "contains";
$.fn.datagrid.defaults.operators.equal.text = "= equals";
$.fn.datagrid.defaults.operators.notequal.text = "! =" is not equal to ";
$.fn.datagrid.defaults.operators.beginwith.text = "^= begins with *";
$.fn.datagrid.defaults.operators.endwith.text = "$= ends with *";
$.fn.datagrid.defaults.operators.less.text = "< less";
$.fn.datagrid.defaults.operators.lessorequal.text = "<= less than equals";
$.fn.datagrid.defaults.operators.greater.text = "> Greater than";
$.fn.datagrid.defaults.operators.greaterorequal.text = ">= greater than equals";
}
It is important to note that if you add this line of code and the Chinese is invalid. Just check to see if Easyui-lang-zh_cn.js was called after Datagrid-filter.js.
As follows:
The final result: the following
Thank you for your support.