1

By clicking search button in toolbar, advanced search window is opened. In first row it contains combobox with selections AND and OR

How to replace those words with words in other language in this window ?

Andrus
  • 26,339
  • 60
  • 204
  • 378

1 Answers1

2

The problem with localization is the bug in the lines where jqFilter method will be called by searchGrid method. The method jqFilter supports groupOps option which are already set in many localization files grid.locale-XX.js, but the jqFilter method will be called without setting of the option.

To fix the problem one should just add

groupOps: p.groupOps,

to the list of options used in the call of jqFilter method. You can search for the text ).jqFilter({ in the jquery.jqGrid.src.js or in the jquery.jqGrid.min.js to find the corresponding place. In jquery.jqGrid.min.js of jqGrid 4.3.1 the p is renamed to f so one have to use groupOps:f.groupOps.

How you can see on the demo the grouping operation in the Advanced Searching dialog will be localized after applying the fix:

enter image description here

If your localized version of grid.locale-XX.js don't contains the texts for AND and OR operation you can set there manually

$.jgrid.search.groupOps = [
    {op: "My And", text: "my AND operation"},
    {op: "My Or", text: "my OR operation"}
];

see the next demo:

enter image description here

Without the described bug fix you can follow my suggestion from the answer on the close question.

UPDATED: I posted the corresponding bug report to trirand. I hope that the fix will be included in the main code of jqGrid.

UPDATED 2: The bug fix is already included in the main code of the jqgrid (see here).

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798