In some cases, you would wish to keep the majority of the locale settings in your javascript language packs, but still change some of them programmatically based on certain client-side conditions.

The way this works is the following - if a specific value for a property is not specified in the PHP code, the default from the language pack will be used. If it is specified in code however, it will override the language pack default.

A common example for this is customizing the Editing Dialog for example. By default (if English language pack is used), the default caption of the dialog and the submit/cancel buttons will have these values (take from grid.locale-en.js):

edit : { editCaption: "Edit Record", bSubmit: "Submit", bCancel: "Cancel" }


If you want to change that however, just set the respective settings in the setNavOptions method of jqGrid, e.g.

<?php ... $grid = new jqGridRender($conn); ... $grid->setNavOptions('edit',array("editCaption"=>"My New Caption","bSubmit"=>"My Submit Text","bCancel"=>"My Cancel Text") ); ... ?>