Highlighted
Absent Member.
Absent Member.
485 views

[archive] Alternate language screens

[Migrated content. Thread originally posted on 02 August 2005]

We are faced with the requirement of providing alternate language screens for the same application. An approach we tried was to display a null screen and use an after procedure to test for the language and then perform the generated initial screen routine for the correct screen. The theory being that only the screen names would have be different. Working storage values, events, exceptions, etc. could be the same for either screen with just the layout and labels varying by the language requirement.

The hook of course is the "ambiguous identifier" when trying to reference a particular control for inquire, modification, etc.

Is there someother way to inquire/modify a control other than then referencing the name or line and position?

Vins Nash
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alternate language screens

If you base your programming on events and control id's I figure this should be doable.
For instance, say you have a gender entry field, using:

77 WS-GENDER PIC X(05).

Screen Sect.
01 screen-english
   03 entry-field USING WS-GENDER ...
        ID 2
   ...

01 screen-spanish
   03 entry-field USING WS-GENDER ...
       ID 2
  ...

01 screen-norwegian
   03 entry-field USING WS-GENDER ...
       ID 2


Event-Procedure

    IF  EVENT-TYPE = MSG-VALIDATE
    AND (EVENT-CONTROL-ID = 2)


Would this do?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alternate language screens

I made a program where the caption of labels and buttons etc... are stored in an indexed vision-file. Each item can have 4 descriptions (for 4 languages).

The labels etc. on the screen have a variable-value, for instance LABEL-VAL(1) for CONTROL-ID 1 and so on.

In the before-procedure of displaying the screen, we read that file
and move the exact descriptions to a grid, depending on the language the user wants.

This way, the user can even change the caption of controls.

Hope this helps
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alternate language screens

Thanks for the help. We're using a little of each. The main problem we've found with variable labels is that the language requirements require ajusting and repositioning sizes. By using identical control ID's and establishing handles for controls after display has given us the ability of having universal code behind most controls that have to be individually modified.

Vins Nash
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alternate language screens

We have used the compiler to differentiate:

02 SC-NAME POS 3
"Navn". |nor
"Namn". |sve
"Name". |eng

and then have separate compiler scripts for each language, for example:

-Si nor -Sx sve -Sx eng
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Alternate language screens

Great idea, and for use in TC environments this is the ideal solution.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.