Multi-Language Management in Ajax

#### Search Results

Search

# Multi-Language Management in Ajax

The multi-language management is responsible for changing the text IDs into strings that are presented to the user.

There are two translation aspects:

- All literals in the GUI definitions of a layout are replaced by strings which are language-specific. This is based on the multi-language management of Application Designer.

  Note
  Detailed information on the multi-language management is provided in the Application Designer documentation at Multi-Language Management.

- Literals that are contained in your application code are handled with the language management of Natural.

In a Natural for Ajax application, both language management systems are related by common language codes. The language codes used are those that are defined for the Natural profile parameter `ULANG` and the system variable `*LANGUAGE`.

The Application Designer documentation describes how the text files containing the language-dependent texts are created and maintained (see the information on writing multi language layouts at the above URL). For a multi-lingual Natural for Ajax application, the names of the directories that contain the text files should be chosen according to the Natural language codes, for instance /multilanguage/4 for Spanish texts.

When an application is started from the Natural logon page (see Starting a Natural Application from the Logon Page), the user can select the language to be used. Depending on the selected language, the same (Natural) language code is set up both in Application Designer and in the Natural session, so that both language management systems are then configured to use the same language.

Note
The language for a session can also be defined in the configuration file sessions.xml, using the Natural for Ajax configuration tool. See Natural for Ajax Runtime Tools in the Configuration and Administration documentation .

It is also possible to change the language while an application is running. This is done by setting the Natural system variable `*LANGUAGE` in the Natural program. Each time this system variable is changed, Natural for Ajax changes the language code for the web pages when the next update of the page occurs.

For compatibility with the predefined multi language directories in Application Designer, the English and German texts need not be stored in /multilanguage/1 and /multilanguage/2, but can be contained in /multilanguage/en and /multilanguage/de.

See also: Multi-Language Management in Workplace Applications.