Release 10.1A: OpenEdge Development:
Translation Manager

> ## Text segment expansion

> This section describes the Translation Manager text segment expansion process.

> Text segment growth is the process of expanding source code text segment allocation at compile time so that translations can fit in their text segments without truncation. Text segment growth is important when you translate a compact language, such as English, into other less compact languages. For example, the English word “file” is shorter than the French translation “fichier.”

> The purpose of text segment expansion is to avoid truncation of text phrases. Text phrase truncation occurs when the Compiler allocates a given number of characters for a text phrase in the text segment but a translation of the text phrase exceeds that number. The translated text phrase is truncated in the text segment and appears truncated on the screen. To overcome this common difficulty, use text segment expansion to add a number of extra characters to each text phrase.

> A drawback to the text expansion process is that additional characters might disturb the layout of the interface.

> The best solution is for developers to create source code that specifies maximum-length options for character strings to provide adequate space for truncation. For more information on how to hard code the length of a text string, see the character-string literal section of OpenEdge Development: Progress 4GL Reference .

> The Translation Manager applies text segment growth to a text phrase only if it has a translation and does not have a hard-coded string-length attribute. If a text string is marked untranslatable (:U), or if it is explicitly set to a maximum length (for example, “hello” R10), the Translation Manager does not apply the text-segment growth expansion factor to that individual text phrase. For more information on the `TRIM` string attribute, see Chapter 1, " Preparing Your Application for Translation."

> The Translation Manager uses the algorithm in Table 8–1 to set the growth factor. For short strings, the Translation Manager increases strings by 200%, meaning that the new strings are three times as long as the original strings (original + 200%).

> Table 8–1: Translation Manager internal text expansion
> Length of source text phrase | Text segment expansion factor
> --- | ---
> Up to 10 characters | 200%
> 11 to 20 characters | 100%
> 21 to 30 characters | 80%
> 31 to 50 characters | 60%
> 51 to 70 characters | 40%
> Over 70 characters | 30%

> The Compile dialog box lets you enter a value in the Growth Table field. This value specifies the percentage of the internal table’s growth factor that the Translation Manager uses to expand text strings.

> Table 8–2 shows examples of how the Translation Manager determines the length of the target phrase.

> Table 8–2: Text expansion examples
> Value of growth table field in the compile dialog box | Length of source text phrase | Corresponding internal table expansion factor | Expansion factor Translation Manager uses | Length of target text phrase
> --- | --- | --- | --- | ---
> 0% | 7 | 200% | 0% of 200 = 0% | 7
> 100% | 5 | 200% | 100% of 200 = 200% | 15
> 50% | 10 | 200% | 50% of 200 = 100% | 20
> 150% | 50 | 60% | 150% of 60 = 90% | 95

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095