Navigation: ABC Library Reference > TranslatorClass > TranslatorClass Methods >====== TranslateControls (translate text for range of controls) ====== | |
TranslateControls( first control, last control [,window] ), VIRTUAL
TranslateControls | Translates text for a range of controls. |
first control | An integer constant, variable, EQUATE, or expression containing the control number of the first control to translate. |
last control | An integer constant, variable, EQUATE, or expression containing the control number of the last control to translate. |
Window | The label of the APPLICATION, WINDOW, or REPORT to translate. If omitted, TranslateControl operates on the active target. |
The TranslateControls method translates the text for each control between the first control and the last control, inclusive. The AddTranslation method sets the translation values for the control text.
Implementation:
The TranslateControls method calls the TranslateControl method for each control with a USE attribute in the specified range. The TranslateControls method ignores controls with no USE attribute.
Example:
Pwindow WINDOW('Preferences'),AT(,,89,34),IMM,SYSTEM,GRAY
CHECK('&Sound'),AT(8,6),USE(Sound),VALUE('ON','OFF')
PROMPT('&Volume'),AT(31,19),USE(?VolumePrompt)
SPIN(@s20),AT(8,20,21,7),USE(Volume),HVSCROLL,RANGE(0,9),STEP(1)
BUTTON('OK'),AT(57,3,30,10),USE(?OK)
END
CODE
OPEN(PWindow)
Translator.TranslateControls(?Sound,?VolumePrompt) !translate ?Sound thru ?Volume
ACCEPT !leave OK button untranslated
END
See Also: AddTranslation, TranslateControl