Consultor Eletrônico



Kbase P15092: Is it possible to set translation attributes for the item values in an AppBuilder maintained combo-b
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Verified

GOAL:

Is it possible to set translation attributes for the item values in an AppBuilder maintained combo-box?

GOAL:

How to set translation attributes for the item values in an AppBuilder maintained combo-box that will be used by Translation Manager.

FIX:

No, it is not possible but you can use this workaround:

1- Create a Combo-Box with List-Item-Pairs defined as Integer, e.g.:
  Week, 1,
  Month, 2,
  Year, 3

2- Save this file and open the .w file in a text or procedure editor.

3- Search for the definition of the Combo-Box:

/* Definitions of the field level widgets                               */
DEFINE VARIABLE COMBO-BOX-1 AS INTEGER FORMAT "9":U INITIAL 0
    LABEL "Combo 1"
    VIEW-AS COMBO-BOX INNER-LINES 5
    LIST-ITEM-PAIRS "Week",1,
                    "Month",2,
                    "Year",3
    DROP-DOWN-LIST
    SIZE 23 BY 1 NO-UNDO.

4- Add the translation attributes by modifying the code as follows and save the file:

/* Definitions of the field level widgets                               */
DEFINE VARIABLE COMBO-BOX-1 AS INTEGER FORMAT "9":U INITIAL 0
    LABEL "Combo 1"
    VIEW-AS COMBO-BOX INNER-LINES 5
    LIST-ITEM-PAIRS "Week":R10,1,
                    "Month":R10,2,
                    "Year":R10,3
    DROP-DOWN-LIST
    SIZE 23 BY 1 NO-UNDO.

5- Go through the process of translation using TranMan and compile the code.

6- Run the .r and notice the visual changes.

note:
Running the code from AppBuilder doesn't show the hard-coded string length (R10).
You need to manually modify the .w everytime you save it in AppBuilder.