Skip to main content

Localization

  • 2 minutes to read

Strings displayed in various message boxes, dialogs and control elements of Developer Express VCL products are stored as resources. This allows you to easily substitute them with custom strings depending on your needs (for instance, with localized versions).

Developer Express offers you a simple and complete mechanism of localizing the resource strings, which is common to all Developer Express VCL products. To replace the default value of a specific resource string during program execution, all you need is to call the cxSetResourceString procedure and pass a resource identifier and custom string as its parameters.

The cxSetResourceString procedure is used with the cxGetResourceString function used by Developer Express controls. When the controls need a specific string to display, they call the cxGetResourceString function, which returns either the custom string or the default string (if the resource string was not replaced).

The resource strings used by the ExpressPivotGrid Suite are declared in the cxPivotGridStrs unit.

Consider the following example. When no data field is visible in the data header area, the ExpressPivotGrid doesn’t display any information since there are no fields to calculate summaries against. In this instance, a message text is displayed in the data area. The following code substitutes this message text with its Spanish equivalent.

uses
...
  cxPivotGridStrs
...
  cxSetResourceString(@scxNoDataToDisplay, '<No hay datos a desplegar>');
See Also