skip to main content
OpenEdge Development: Visual Translator
Translating : Translating phrase by phrase
 
Translating phrase by phrase
The following types of text phrases are not included in the resource procedures. You must translate them in the Translations tab folder:
*Dynamic widgets — User interface components that your application creates or deletes during the execution of a procedure. These components cannot be stored in resource procedures.
*Text phrases that are not visualized at run time — For example, in the following code, “Amsterdam” is a text phrase in the 4GL code but it is not a user‑interface element such as a label:
FOR EACH customer-name WHERE city = "Amsterdam"
*Message statements — Messages such as errors, warnings, or helpful hints. You can view a message statement in an alert box after you translate it in the Translations tab folder.
Note: In the Translations tab folder, you can also make changes to any in-context translations.
You can also use the Translations tab folder for global translation to control consistency of translation throughout the procedures in a kit. You can translate text phrases into a certain target phrase, no matter what the context. For example, in the Translations tab folder, you can globally change all instances of “open” in the English source language to “ouvrir” in the French target language.
Opening the Translations tab folder
The Translations tab folder allows you to translate a text phrase by instance.
To translate a text phrase by instance:
Follow these steps to translate a text phrase by instance:
1. Click the Translations tab to open the Translations tab folder and view the text phrases for the entire kit.
2. Choose ViewSort or click on the Sort button. The Sort dialog box appears:
3. Specify to sort first by target phrase in ascending order, then choose OK. The untranslated text phrases appear at the top of the Translations tab folder.
4. Click in the target phrase column of a row that contains a phrase you want to translate. A box appears around the target phrase fill‑in area and a cursor appears in the box, as shown below. If you cannot view the entire phrase, double-click on the phrase to open a larger window:
Opening the glossary window
The Glossary window allows you to view glossary suggestions while you translate in the Translations tab folder.
To open and use the Glossary window:
1. Select a source text phrase in the Translations tab folder.
2. Choose WindowGlossary to open the Glossary window and view the glossary suggestions for the target phrase selected in the tab folder:
3. Select the combo-box button to also display glossary suggestions for each word in the text phrase:
4. Activate the Use Word Indexing toggle box to display all target phrases that contain a translation for one of the words in the source phrase.
Editing a glossary suggestion
To edit a glossary suggestion:
1. In the Glossary window, click a glossary selection. The glossary entry appears in the Target Phrase column of the Translations tab folder.
2. Edit the entry in the Translations tab folder.
Entering a translation
Select a target suggestion from the Glossary window or type a target phrase directly in the target phrase fill‑in area, then press RETURN. The Visual Translator saves the target phrase.
To edit a translation, use the Cut, Copy, and Paste buttons. To enable these buttons, select a cell in the Target Phrase column. The Visual Translator cuts and copies the entire contents of a selected cell. You can then manually edit the text using the keyboard.
To view the translation of a message in context, click the View button.
You can view any text phrase in a separate, larger dialog box by double-clicking on any field of the Translation tab folder. Figure 3–2 shows the Long String Translator dialog box.
Figure 3–2: Long String Translator dialog box
The Long String Translator dialog box allows you to view and edit text phrases. If a string is longer than thirty-four characters and does not fit in the Translations tab folder, you can view it in the Long String Translator dialog box. The source string displays in the Source String viewer. The target string displays in the Target String viewer. You cannot edit the source string, but you can edit the target string within the Target String viewer.
Global translation
This section describes how to use the Visual Translator to translate text phrases globally.
To translate text phrases globally:
1. From the Translations tab folder, choose EditReplace. The Replace dialog box appears:
2. In the Find What field, type the source phrase you want to translate.
3. In the Find section, activate Source.
Note: Finding by source phrase results in optimum performance.
4. Activate the options you want to use during the Find process:
*Ignore Leading Spaces — If you activate this toggle box (the default), the Visual Translator finds the phrase you specify in the Find What field even if it has blank spaces in front of it.
*Case Sensitive — If you activate this toggle box, the Visual Translator finds the phrase only if it exactly matches the uppercase and lowercase letters you specify. For example, if you specify “Close,” it does not find “close” or “CLOSE.”
*Use Wildcards — If you activate this toggle box, the Visual Translator lets you use an asterisk (*) and a period (.) as wildcards in the Find What field. For example, if you specify “*cat*”, it finds all phrases that contain “cat,” such as “concatenate” and “category.” If you specify “.File,” it finds all phrases that contain “File” preceded by a single character, for example, “_File.”
5. In the Replace What field, type the target phrase you want to replace. If you want to replace all target phrases for the specified source phrase, leave the Replace What field blank.
6. In the Replace With field, type the target phrase you want to use. In the example shown below, the translator is translating all instances of the English source phrase “File” to the German target phrase “Datei”:
In the following example, the translator is changing the target phrase to “Datei” only for those instances of “File” that have a target phrase of “Akte”:
1. Choose Replace All.
2. If the text phrase is for a user‑interface object in a resource procedure or for a message and you would like to see the translation in context, select a row that contains the translation you want to view, then click the View button.
The corresponding resource procedure or an alert box containing the message appears.