PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | French EN
  • Overview
  • How to proceed?
  • Translating the message during the input
  • Converting character strings in the code into multilingual messages
  • Browsing the messages to translate found in the different project elements
  • Performing a search within the translated messages
  • Finding and deleting the unused messages
  • Characteristics of the message to translate
  • Characteristics
  • Displaying a message in a non-supported language
  • Linked multilingual messages
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
When developing a multilingual application, you have the ability to translate the different messages displayed to the user (messages displayed by Info, YesNo, ... for example).
This translation is performed and entered in the window of translated messages.
Each translated message corresponds to a "resource". The same resource may be used several times, in different processes.
Remark: For more details on developing and programming a multilingual application, see Multilingual applications.
How to proceed?

Translating the message during the input

To translate the message during the input:
  1. Select the text to translate.
  2. Select "Translate" from the popup menu. The window for translating messages is displayed.
  3. Enter the translation of the message and validate.
    The icon found in the language caption is used to display a menu for simplifying the translations. See Typing multilingual texts for more details.
  4. An icon and a number are displayed on the right of the translated message. This number indicates the number of translations entered for the current message. The flag allows you to quickly access the translation window.
    When the flag is hovered over, a tooltip shows the different translations found for the string in all the project languages.
Remark: If your application supports languages that use specific character sets, you must type the translation of the different messages using these character sets. See Managing specific character sets in a multilingual application for more details.

Converting character strings in the code into multilingual messages

To convert strings in the code into multilingual messages:
  1. On the "Code" pane, in the "Languages" group, expand "Translate strings" and select "Convert simple strings into multilingual messages".
  2. Select the elements where the conversion must be performed.
  3. For each character string found, the editor proposes to convert or not to convert this string into a multilingual message.
    Remark: If "Re-use the existing messages" is checked, identical multilingual messages will correspond to the same resource.
  4. Validate the conversion.

Browsing the messages to translate found in the different project elements

To browse the different messages to translate found in the project elements:
  1. Display the window for typing the translated messages: on the "Code" pane, in the "Languages" group, expand "Translate strings" and select "Translate messages" (or press Ctrl + T).
  2. Select the element containing the resources (messages to translate).
  3. Use the arrow buttons to browse the resources. You have the ability to modify the messages or to add new messages at any time.

Performing a search within the translated messages

To perform a search in the translated messages:
  1. Enable the search: on the "Home" pane, in the "Find" group, expand "Find" and select "Find" (or press Ctrl + F). The "Find - Replace" pane is displayed.
  2. Specify the text to find.
  3. Specify the options:
    • Search in the code.
    • In the advanced options ( ), specify that the search must be performed in the multilingual strings found in the code.
Remark: You can also click in the message translation window. The "Find - Replace" pane is displayed with all the necessary options.

Finding and deleting the unused messages

To find and delete the unused messages:
  1. On the "Code" pane, in the "Languages" group, expand "Translate strings" and select "Find unused messages". The wizard for optimizing the multilingual messages starts.
  2. Select the unused messages and validate the wizard to delete the selected messages.
Characteristics of the message to translate

Characteristics

  • A message displayed in an application must be translated into all the languages selected for the project.
  • A message can contain several lines.
  • A message can contains special characters (tabulation for example).
  • To type special characters, you must type the corresponding ASCII code. To do so, use the numeric keypad and enter the corresponding ASCII code (Alt + 09 for a tab, or example).

Displaying a message in a non-supported language

At runtime, if a message has not been translated to the specified language (i.e. if the message is not associated with this language), the mechanism of preferred languages displays the information in a language similar to the desired one.
Linked multilingual messages
A multilingual message can be copied/pasted at several locations in several processes or events of the same project.
Two options are available to copy the multilingual message:
  • the message is directly copied, without keeping the link with the original message (default).
  • the message is pasted and the messages remain linked: modifying a message also modifies the other linked messages.
Versions 25 and later
To keep the link:
  1. Copy the initial message (Ctrl + C).
  2. Go to the code of the element where the message will be pasted.
  3. On the "Home" pane, in the "Edit" group, expand "Paste" and select "Special paste".
  4. The message is pasted and the link is kept. When the link is kept, a specific icon on the flag indicates that the multilingual message is used several times in the code.
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
In this case, the window for managing multilingual messages (opened by pressing Ctrl + T on the message) is used to know the different uses of the message ( ).
New in version 25
To keep the link:
  1. Copy the initial message (Ctrl + C).
  2. Go to the code of the element where the message will be pasted.
  3. On the "Home" pane, in the "Edit" group, expand "Paste" and select "Special paste".
  4. The message is pasted and the link is kept. When the link is kept, a specific icon on the flag indicates that the multilingual message is used several times in the code.
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
In this case, the window for managing multilingual messages (opened by pressing Ctrl + T on the message) is used to know the different uses of the message ( ).
To keep the link:
  1. Copy the initial message (Ctrl + C).
  2. Go to the code of the element where the message will be pasted.
  3. On the "Home" pane, in the "Edit" group, expand "Paste" and select "Special paste".
  4. The message is pasted and the link is kept. When the link is kept, a specific icon on the flag indicates that the multilingual message is used several times in the code.
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
The pictogram of the flag indicates that this message is used in several locations in the code. Therefore, a modification will impact all the uses
In this case, the window for managing multilingual messages (opened by pressing Ctrl + T on the message) is used to know the different uses of the message ( ).
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment