Progress
Translation Manager
Guide
Explicitly Sizing and Positioning Widgets
If developers use explicit sizing and positioning when they define widgets, the application is easier to translate and the interface layout does not vary from one translation to another. Relative layouts, while easier for a developer to code from the Procedure Editor, have more problems compared to layouts made with the AppBuilder, which uses absolute sizes and coordinates.
The following code in
tmproc1.p
shows an example of code created in the Procedure Editor:
This code example has the following translation problems:
- The widths of variables a and b are defined implicitly at compile time based upon properties such as the label. The label, “Replace if E&xists,” might have an implicit width of 18 characters which, depending on the font used, might not display the entire label text in the source language, let alone the target language.
- The width and height of the frame are not explicitly defined in the DEFINE FRAME statement. Typically, this means that the frame will not grow to accommodate translation space. Instead, the frame is clipped on the right side due to the implied widths of a and b.
- Progress positions the frame at row 1, column 1 because the frame’s position is not explicitly defined.
- The SKIP and SPACE options might not properly align the free text, “Options,” or the variables a and b.
To design for translatability, use the following code instead of the code in
tmproc1.p
:
NOTE: Even when you use explicit sizing and positioning of widgets, you can still encounter text-expansion problems unless you also create margin space around widgets to accommodate expanded text phrases.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |