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

The way this works is the following - if a specific value for a property is not specified in 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. By default (if English language pack is used), the default caption of the dialog and the submit/cancel buttons will have these values (taken 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 the jqGridRender class, e.g.

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