Back to Devexpress

cxSetResourceString(TcxResourceStringID,string) Method

vcl-dxcore-dot-cxsetresourcestring-x28-1b162ccf-x29.md

latest1.9 KB
Original Source

cxSetResourceString(TcxResourceStringID,string) Method

Substitutes a value of the resource string returned by a cxGetResourceString function call.

Declaration

delphi
procedure cxSetResourceString(AResString: TcxResourceStringID; const Value: string);

Parameters

NameTypeDescription
AResStringTcxResourceStringID

A pointer to the target resource string identifier.

| | Value | string |

The required resource string value.

|

Remarks

String constants for DevExpress products are stored as resources. The cxGetResourceString function is used internally to retrieve strings for specific UI elements. You can call the cxSetResourceString procedure to substitute a value of a specific resource string at runtime for localization.

Note

An updated resource string value does not replace the corresponding string stored in an executable file.

Code Example: Localize a Resource String

The following code example specifies a new value for the cxSDatePopupClear resource string in German:

delphi
uses
  dxCore; // Declares the cxSetResourceString global procedure
// ...

  cxSetResourceString(@cxSDatePopupClear, 'Löschen');
cpp
#include "dxCore.hpp" // Declares the cxSetResourceString global procedure
// ...

  cxSetResourceString(&_cxSDatePopupClear, "Löschen");

Note

To easily localize applications that use standard, DevExpress, or other third-party controls to any language supported by Windows, use the TcxLocalizer component.

See Also

Localizer Editor

dxCore Unit