3 5 2 Multilingual Text Variable Concepts

Visual LANSA

3.5.2 Multilingual Text Variable Concepts

Like system variables, multilingual text variables can be used in a number of places, such as default values for a field in the repository, in validation rules or as parameters in RDML commands.

Unlike system variables, multilingual text variables are specific to a partition.

The following example of a text string means the same thing in different languages, but has a different textual value in each language:

"Locate Employee by Name"

"Ricerca Alfabetica Impiegati"

"Zoek Werknemer op Naam"

 

If this was a piece of text that you wished to place on a screen panel, a report, or send in a message, then a multilingual variable (sometimes called an *MTXT variable) should be used.

By positioning an *MTXT defaulted field on the screen, rather than just text, the values that appear on the screen panel at execution time will vary according to the language being used.

In many respects *MTXT variables are just like system variables (described in 3.5.1 System Variable Concepts), and they can be used in the same places as system variables:

  • As a field's default value in the repository.
  • In any of the 6 standard types of field validation rules.
  • Just about anywhere in the RDML components of LANSA.

The extensive use of multilingual variables in validation rules has many advantages:

  • The validation rules are simpler and easier to understand.
  • The validation rules are more powerful and more accurate.
  • The validation rules work in multiple languages.

For example, imagine that you have created these multilingual variables:

*MTXTMON

"Monday" in all desired languages

*MTXTTUE

"Tuesday" in all desired languages

*MTXTWED

"Wednesday" in all desired languages

*MTXTTHU

"Thursday" in all desired languages

*MTXTFRI

"Friday" in all desired languages

*MTXTSAT

"Saturday" in all desired languages

*MTXTSUN

"Sunday" in all desired languages

*MTXTERR001

"Day of week specified is invalid" in desired languages

 

Then, in just one list of values rule in the repository, a file or an RDML program, you could validate the day of the week (in the current language) and issue an error message (in the current language).

Additionally, as the list of *MTXT variables grows, they will become used repeatedly in different applications. For instance *MTXTMON, *MTXTTUE, etc might be used as column headings on screen panels or reports.

Note: Before attempting to make large scale use of *MTXT variables, please develop and use naming standards for them.

 

Also see

Create Multilingual Variables

Ý 3.5 System & Multilingual Variables Development