Text parameters

The language switching system enables the placement of parameters into localizable texts. To do this, a placeholder is noted in the text for each parameter. In most cases, these placeholders are numbered. They are enclosed between two @ symbols.

  • Text definition
    The temperature has risen from @1@ to @2@.

  • Data sources
    In this case, the data sources for the two parameters are two process variables with the values 10 and 12.

  • Result
    At runtime, the placeholders for the parameters are replaced by the values of the process variables: The temperature has risen from 10 to 12.

Source of the parameters

The values of the parameters can originate from various sources:

  • Numbers/values

    • The value usually originates from a process variable specified in the parameter.

  • Texts

    • The text can originate from a process variable.

    • The text can originate from another localizable text.

    • The text can originate from a text group and be selected by a process variable value.

  • Date/time (timestamp)

    • The timestamp can be the system time.

    • The timestamp can originate from a process variable.

  • Object reference

    • With some object definitions, a text parameter can access another object definition (see Alarm type, for example).

Formatting

Values can be formatted when they are inserted into the text:

  • Numbers/values

    • Number of integral and fractional digits (e.g., the value 35.2468 with three fractional digits as 35.247)

    • Padding the integer range with zeros or spaces (e.g., with four integral digits as 0035.247)

    • Number format as a floating-point number or scientific notation (with E-notation), e.g., 3.525E001

    • Number system: decimal, binary, or hexadecimal (e.g., the value 1234 as hexadecimal 4D2).

  • Date/time (timestamp)

    • Display of the date and/or time with selection and formatting of individual elements (e.g., as 31.03.2025 07:09:35 or shorter as 31.3.25 7:9).

Syntax

  • Numbers

    • @NF@ N = number, F = formatting character

    • @A:F@ A = alphanumeric name, F = formatting character

  • Texts

    • @A:F@ A = alphanumeric name

The Edit Localizable Text dialog assists you in formatting the text parameters. N is any number used to identify the parameter. A is any alphanumeric name used to identify the parameter. F is automatically inserted by the formatting elements of the dialog (see also the following table).

Related topics: