Skip to main content
A newer version of this page is available.

ExpressMap Control: Resource Strings

  • 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. You can use the TcxLocalizer component designed to simplify localization tasks, or manually replace the default value of specific resource strings at runtime via the cxSetResourceString procedure calls. When Developer Express 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).

Using the Localizer Editor tool accompanying the TcxLocalizer component, you can easily translate resource strings and store them within files for later use with the component. This eliminates the need to copy your cxSetResourceString code blocks between your projects – simply reuse your translation files. To learn more about the TcxLocalizer component, please refer to the How to: Localize an Application topic.

The resource strings used by the ExpressMapControl Suite are declared in the dxMapControlStrs unit.

Example

The following code replaces the default caption of the North cardinal point displayed by navigation panel coordinates with its German equivalent:

cxSetResourceString(@sdxMapControlNorth, 'Norden');

Below is a list of resource strings defined within the ExpressMapControl Suite and their default values:

Resource identifier

Value

Description

sdxMapControlEast

‘E’

Specifies the default caption of the East cardinal point displayed by navigation panel coordinates.

sdxMapControlFeet

‘ft’

Specifies the default caption of the foot unit displayed by the miles scale.

sdxMapControlKilometers

‘km’

Specifies the default caption of the kilometer unit displayed by the kilometers scale.

sdxMapControlMeters

‘m’

Specifies the default caption of the meter unit displayed by the kilometers scale.

sdxMapControlMiles

‘mi’

Specifies the default caption of the mile unit displayed by the miles scale.

sdxMapControlNorth

‘N’

Specifies the default caption of the North cardinal point displayed by navigation panel coordinates.

sdxMapControlSouth

‘S’

Specifies the default caption of the South cardinal point displayed by navigation panel coordinates.

sdxMapControlWest

‘W’

Specifies the default caption of the West cardinal point displayed by navigation panel coordinates.