PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • How to translate a text file with WDTRAD?
  • How to find a message in WDTRAD?
  • How to force a keyboard to enter text in WDTRAD?
  • Notes
  • Specific characters in the resources (library framework, programming messages, etc.)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
How to translate a text file with WDTRAD?
To translate a text file with WDTRAD:
  1. Select the source language (language in which the text was extracted) and the target language (language to which the text must be translated).
    Remark: If text must be translated to a custom language, select "Custom language" and specify its characteristics (keyboard, writing direction, etc.).
  2. In "Reference", select the file that contains the messages to be translated. This file can be:
    • a text file (".txt" extension).
    • an HFSQL data file (".fic" extension).
    • a WDMSG file (".wdmsg" extension).
  3. In "Translation", select the translation file. This file can be:
    • a text file (".txt" extension)
    • an HFSQL data file (".fic" extension).
    • a WDMSG file (".wdmsg" extension).
  4. Select the dictionary to use. This dictionary contains the existing translations.
    WDTRAD is supplied with a French/English dictionary containing over 6000 messages.
  5. If WINDEV, WEBDEV or WINDEV Mobile is installed on the computer, select the project that contains the text to translate (Project" option under the dictionary path). If the project is selected, you will be able to view the text in the corresponding IDE ("View in project" in the context menu of the message).
  6. Click "Load" to display the content of the selected files. The "Reference" column displays the extracted text. The "Translation" column displays the translated text to be reintegrated. Each row in the table represents a text resource.
    Remark: Untranslated resources are highlighted with an orange background.
  7. Click "AutoTrans". All "Reference" expressions found in the dictionary are automatically translated.
  8. Select a row and edit the translation if necessary.
    Remark: If you make changes to the reference file, you must reintegrate it into the WINDEV, WEBDEV or WINDEV Mobile application using WDMSG.
  9. Click the search icon next to the resource: a window opens and shows the context of the resource to be translated. The control being translated is highlighted with a red border.
  10. Double-click the resource (or click "Find"). The different translation suggestions appear in the dictionary results. Translations are sorted by relevance. The icon next to each translation indicates the relevance of that translation.
    Remark: WDTRAD automatically rebuilds a translation when a close translation is found.
  11. Double-click the desired translation. The translation is automatically copied into the "Translation" column of the current resource.
    Remark: If there is no suitable translation, you can write your own translation in the "Translation" column of the current resource. To add this new translation to the dictionary, select "Add to dictionary" in the context menu of the resource.
  12. Repeat steps 8 to 10 for all the resources you want to translate.
  13. Click "Save" to save the reference and translation files.
Remarks:
  • To view long resources and/or resources in RTF, select "View in form mode" in the context menu of the resource.
  • The file containing the translated resources:
    • can be printed for proofreading ("File .. Print").
    • can be integrated into the project using WDMSG or WDINT.
  • WDTRAD offers two methods to copy extracted and translated text. For more details, see the Copy modes.
  • To configure the dictionary (add, modify or delete resources), select "Dictionary properties" in the context menu of the dictionary results. For more details, see Dictionary properties
  • To configure WDTRAD, select "Edit .. Preferences". The details of these options are presented in WDTRAD options.
  • WDTRAD allows you to differentiate translations by supporting multiple locations. For example, you can set a "Commercial" location to group translations of commercial documents, and an "Interface" location to group translations of elements from the interface. You can choose the location during the translation process and when adding an element into the dictionary.
    To create new locations, select "Edit .. Edit the locations".
  • You can configure the characteristics of each language: keyboard used, symbols. For more details, see Dictionary properties.
  • Some translated resources (automatic translations, for example) may be displayed on an orange background. This might seem to indicate that the resource was not translated. A specific algorithm determines whether or not a resource has been translated:
    • One-letter words are considered valid translations if they are identical.
    • If the "Considered as translated when identical" option is enabled, resources are considered as translated if the translation is identical to the reference.
    In all other cases, a ratio is calculated between the number of words in the reference text and in the translation. If this ratio is below a dynamically defined threshold, the resource is not considered as translated. Besides, the resource is considered as translated only if the number of lines is the same both in the reference and target texts.
How to find a message in WDTRAD?
To find a message in a file opened in WDTRAD, you can:
  • sort the messages in alphabetical order: click the header of the column.
  • sort messages by type: click on the "Type" column header.
  • apply a filter to display only the rows marked with a label: click on the label icon in the "Type" column and select the label to filter. To delete the filter, select "Cancel filter" in the menu displayed by the icon.
  • perform a simple search: click in the column header and type the beginning of the message you are searching for.
    Remark: This search can also be performed in resources from the dictionary.
  • use a filter: right-click on the search icon in the column header and select "Filter" with the filter description. Enter the filter condition in the column header: only the corresponding rows will be displayed in the table. To delete the filter, select "Delete filter" in the context menu of the column.
  • perform an advanced search: press Ctrl + F and enter the search parameters:
    • The text to search for,
    • The text that will replace the text you are searching for (if necessary),
    • The language in which the search must be performed,
    • The characteristics of the search ("whole word only", "case-sensitive", "loop").
    Use the "Next", "Replace" and "Replace all" buttons to search and replace.
To perform a search the WDTRAD dictionary, you can:
  • Use the search box displayed below the list of resources. Simply type the desired text, choose the target language, and click "Search".
  • Use the "Search" tab in the dictionary properties. For more details, see Dictionary properties.
How to force a keyboard to enter text in WDTRAD?
WDTRAD automatically changes the keyboard and character set according to the language. This mechanism allows you to enter text in languages that require specific keyboards and character sets (Russian, Chinese, Japanese, Arabic, Greek, etc.).
This also switches the keyboard to a QWERTY layout when entering text in English. To enter text in English using a French keyboard (AZERTY), you must change the keyboard associated with the English language in Windows:
  1. Open the WDTRAD settings ("Edit .. Preferences").
  2. Select "Automatically change keyboard language" and "Automatically install missing keyboards" if necessary. This option allows you to install and enable missing keyboards.
  3. Confirm the WDTRAD settings window.
Notes

Specific characters in the resources (library framework, programming messages, etc.)

Some messages include:
  • Strings such as %s, %1, %2, %1!d!, ...
    These strings represent parameters in the text. At runtime, these strings are automatically replaced with a file name, a directory name, ...
    These strings must not be modified or deleted in the translation. However, you can change the position of these strings within the text.
    For example, the message "Error in %2 process, line %1!d!" will be translated as "Erreur à la ligne %1!d! du traitement %2.".
  • Strings such as [%xxxx%]
    These strings represent parameters in the text. At runtime, these strings are automatically replaced with the content of a variable, ...
    These strings must not be modified or deleted in the translation. The content of these strings must not be translated. However, you can change the position of these strings within the text.
    For example, the French translation of the message "Do you confirm the creation of the customer: [%sCustomerName%]" would be "Confirmez-vous la création du client: [%sCustomerName%]".
  • Strings such as \t, \n, \r.
    These strings are used to define the text formatting (tab, line feed, etc.).
    These strings must not be modified or deleted in the translation. The position of these strings should not be changed.
    For example, the message "Unable to open xBase <%1!s!> file.\r\nError code returned by xBase DLL: %2!d!." will be translated as "Impossible d'ouvrir le fichier xBase <%1!s!>.\r\nCode d'erreur renvoyé par la DLL xBase: %2!d!.".
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment