Please enable JavaScript to view this site.

ESL Documentation

Strings are externalized if they are used in one of the following four areas:

• String constant and variable initializations

• User visible text in object definitions

• Actions that modify user visible text

• General manipulation and flow control action statements

 

When the program is run, the externalized strings are loaded from the external string resource DLL.

String literals are externalized if they are used in any of the following places.

Definitions

• string constant

• string variable

• Arrays of string constant or string variable

Object Definitions

• title bar attribute in regions

• text attribute in controls

• text attribute in pulldown, choice and button definitions

• text drawing statements in graphical regions, keys, and patterns

• insert text attributes for list box, combination box, dropdown list, and spin button definitions

• insert ticks attributes for slider definitions

• column heading attribute in table definitions

• text and overwrite for dynamically defined textual regions

• insert row for dynamically defined tables

Action Statements that Cause User-Visible Changes

• change column heading

• change item text

• change text

• insert drawing statement in add to and change graphic

• overwrite drawing statement

General Action Statements

• The expression used in the switch statement, but strings in case statements are not externalized.

• while loop

Identical Strings

When the same string literal is used in more than one place, it is only put in the resource file once. This saves space and translation effort, but requires you to be careful of using the same string with different meanings in different places.

External String Identifiers

External string identifiers can be any integer. When the compiler reads in a resource file, it uses the identifiers defined for the strings in the file. It starts assigning identifiers to new external strings at the next integer above the highest one in the resource file.

Identifiers are generally assigned in the order of definitions and statements in the source file, except that when there is more than one literal in a single statement they may not be given identifiers in the same order.

There are cases in which the compiler skips an identifier, because of the way it handles some strings that are not externalized.

• append

• copy

• extract, skip and take

• for loop

• find

• if

• send

The insert statement for list box, combination box, dropdown list, spin button, and slider controls allow multiple lines or labels to be defined with a single string, using newlines (\n) to separate them. Instead of externalizing the whole string together, the compiler first splits these strings at the newline characters and externalizes each separate line or label.