Localization on dhtmlxGrid recinfoArea

According to the Samples of dhtmlxGrid, pagination can be enabled through the following API call:


By calling this method, records info will be shown (“Results 11-40 from known 100”). Is there any way to localize this records info string? I am trying to find out whether dhtmlxGrid has multi-langauges support.

To localize paging bar you can use following method:
records:"Records from “,
to:” to ",
page:"Page “,
perpage:“rows per page”,
first:“To first Page”,
previous:“Previous Page”,
found:“Found records”,
next:“Next Page”,
last:“To last Page”,
of:” of ",
notfound:“No Records Found” }

Please find more information about customization paging output here dhtmlx.com/docs/products/dhtmlxG … custpaging

I wanted to know if “grid.setPagingTemplates(navigation_template,info_template)” can be used for toolbar skin of the grid pagination?

I have a grid with toolbar style of pagination, and calling above method is not resulting in the custom message of the pagination.

Vibhav Agrawal

setPagingTemplates() cannot be used with toolbar paging skin. To customize toolbar paging skin you should use setPagingWTMode() method. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … aging_skin

Hi Olga,

I want to change the string format used to display the messages:
The pagination text is being displayed in English Language in the following format:

[Records from ][to]
[rows per page].

In some language the format to display is:
[Records from ]:

So, i want to change the format of the string being displayed (the same thing which can be done using grid.setPagingTemplates().

Is there any way to do this?

Vibhav Agrawal

In case of paging-with-toolbar, text taken from grid.i18n.paging structure, described at the top of the post. You can change its values before calling enablePaging, and new values will be taken instead of original one, for toolbar rendering.

Hi Stanislav,

I will reframe my question.
The format of displaying the pagination status is different in other language (eg. Hindi, etc).
The format in which we want to display the text is:

[to] [Records from ] [of]

But, i think dhtmlx grid uses the default format of:
[Records from ][to]
[rows per page].

So, if i just populate dhxGrid.i18n.paging= {} object, then the message shown is not correct as the format of the message is not same as that in English.

The API setPagingTemplate() used to provide us a way to change the format of the message. And this is what we want to do here in toolbar style of pagination.

Vibhav Agrawal

[code]function my_corrector(){
var state = this.getStateOfView();
var start = state[1];
var end = state[2];

     this.aToolBar.setItemText('results',"<div style='width:100%; text-align:center'>"+this.i18n.paging.records+(start+1)+this.i18n.paging.to+end+"</div>");


grid.attachEvent(“onPageChanged”, my_corrector)
grid.attachEvent(“onXLE”, my_corrector)[/code]

You can replace text inside setItemText call in any necessary way.