PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Choosing the languages supported by the project and the analysis
  • Languages supported by the project
  • Languages supported by the analysis
  • Languages supported by the different project elements
  • Translating the interface into multiple languages
  • Translation method
  • Languages that use a specific character set
  • Translating specific pages
  • Translating WLanguage code messages
  • Choosing the language by programming
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
7. Multilingual sites in practice
Previous pageTable of contentsNext page
Overview
A multilingual site can be distributed in several languages. The different languages of the site will be taken into account during the different development steps.
The main steps for developing a multilingual site are as follows:
  1. Choosing the languages supported by the project and the analysis.
  2. Entering the project elements (pages, code, etc.) in the different project languages.
  3. Defining the project language by programming.
  4. Managing specific character sets in the data files.
  5. Creating the library and the setup program.
Remarks:
  • If the operating system supports several languages (Hebrew, Arabic, Greek, etc.), the corresponding character set will be automatically used when translating to these languages.
  • If your site is multilingual, this feature must also be managed in the user groupware pages and in the HFSQL automatic error management pages. For more details, see the online help.
  • HFSQL data files and page controls support the Unicode standard.
Choosing the languages supported by the project and the analysis

Languages supported by the project

The different languages supported by the project are defined in the project description:
  1. On the "Project" pane, in the "Project" group, click "Description". The project description window appears.
  2. In the "Languages" tab, you can add or delete the languages supported by the project.
The selected languages will be proposed for all multilingual resources that can be translated (captions of controls, menu options, help message associated with a control, etc).
When changing the project language, changes will be automatically taken into account:
  • for new elements or objects created in the WEBDEV editor,
  • for all elements or objects opened in the WEBDEV editor.
The main language corresponds to the language used by default at runtime.
Linguistic options
The "Languages" tab of the project description also allows you to define all language-specific options: number, currency, date, etc.
The parameters used by default are the ones defined in the Windows language options (accessible from the Windows control panel).
When creating an edit control or a column in a Table control that displays numeric data (number, currency, date, time, etc.), the input mask applied will be the mask defined in the project language options. This option is available in pages.
At runtime, when an edit control or a table column has a mask "Defined by the project", the input mask and/or the display mask will automatically adapt according to the options selected in the project for the language displayed at runtime.
Remark: The linguistic options are also used to define the writing direction and the character set used ("Various" option).

Languages supported by the analysis

If your project uses an analysis, the languages supported by the analysis are selected in the data model editor. The same analysis can be shared between different projects that do not use the same languages. Therefore, the analysis might use more languages than the project.
To configure the languages supported by the analysis:
  1. Open the project analysis in the editor.
  2. Open the analysis description window: on the "Analysis" pane, in the "Current element" group, click "Description".
  3. Select the "International" tab.
The different languages configured in the analysis will be proposed:
  • when configuring the shared information of the items. The description of the controls bound to the items (options, captions, etc.) can be entered in the different languages supported by the analysis. When generating a "full RAD" or a page RAD, this information will be automatically taken into account for all languages common to the analysis and the project.
  • for the information printed in the program documentation (notes of data files or items).

Languages supported by the different project elements

By default, the different elements of the project (pages, reports, code, classes, etc.) support the same languages as the project in which they were created.
In some cases, an element may support more languages than the project (when the element is shared between several projects that support different languages for example).
Translating the interface into multiple languages
When the languages supported by the project have been selected, the information displayed by the site must be translated into these different languages.
To translate the interface into several languages, some elements must be taken into account:
  • The selected translation mode.
  • The supported languages.
  • The use of specific pages (user groupware, automatic management of HFSQL errors).
  • The messages displayed by programming.

Translation method

WEBDEV proposes several translation modes:
  • Automatic translation of interfaces via a specific translation tool installed on the development computer. This translation is performed in the WEBDEV editor.
  • Export all the messages via WDMSG and reintegrate them once they have been translated.
Translating interfaces
Several multilingual areas are displayed in the description window of each object. These multilingual areas allow you to enter information in the different languages supported by the project.
To translate this information from WEBDEV:
  1. Open the WEBDEV options to configure the translation options of the software used: on the "Home" pane, in the "Environment" group, expand "Options" and select "General options of WEBDEV".
  2. In the "Translation" tab, choose:
    • the default translation tool (as well as the transmission mode for the text to translate and for the translated text).
    • the source and destination languages for the translation.
  3. If a translation tool is specified, a "Translate" button will be displayed in each element containing information to translate. This button is used to translate the selected text via the specified translation tool.
  4. Select the text to be translated and click "Translate".
Exporting and reintegrating the information to translate
WDMSG is used to extract all project messages (control captions, etc.) and reintegrate them once they have been translated.
Contact PC SOFT Sales Department for more details about the conditions for using this product.

Languages that use a specific character set

If your site supports languages that use specific character sets (Greek, Russian, etc.), you must enter the translation of the different messages using these specific character sets.
WEBDEV allows you to automatically manage the use of specific character sets in the editor.
When the text cursor is located in the input area of a language that uses a specific character set, the corresponding input language (character set used by the keyboard) is automatically enabled.
Therefore, if a caption is entered in the Russian section of the caption description, the keyboard will automatically switch to the Russian character set.
Reminder: To use specific character sets, the files corresponding to the desired character sets must be installed in the Windows region settings (control panel).

Translating specific pages

HFSQL error management
By default, HFSQL error management pages are provided in English and French. To translate them into another language, you must:
  1. Include the default error pages in your project. These pages are provided as example in \Programs\Data\Preset pages\HFSQL - Automatic help pages.
  2. Customize the management of errors to use the HFSQL pages for error management (HOnError).
  3. Translate the different messages (see previous paragraph).
User groupware
By default, the user groupware is provided in English and French.
To translate a site that uses the user groupware, you must choose the "Custom" mode when the user groupware is included in your site. Reminder: To configure the user groupware, go to the "Project" pane, "Project" group and click "User groupware".
The different pages of the user groupware will be included in your project.
Then, all you have to do is translate these pages.
Remark: Uncheck "Automatic start" if necessary: this allows you to display a page to select a language before the login page.

Translating WLanguage code messages

In your code, several WLanguage functions allow you to communicate with users via character strings. These messages must also be translated into the different languages of your site.
To translate a character string typed in the code editor:
  1. Select the character string to be translated.
  2. Select "Translate" in the context menu of the selection. The window for translating messages is displayed.
  3. Type the translation and validate. The code line is displayed in the code editor:
    • The icon indicates that this string has been translated to other languages. Click the icon to open the translation window.
    • To see the existing translations, simply hover over the icon.
Remark: To transform all the messages in your code into multilingual messages, go to the "Code" pane, "Languages" group, expand "Translate strings" and select "Convert simple strings into multilingual messages".
Choosing the language by programming
A multilingual site is an application that can be distributed in several languages. The user will be able to choose the language used by the application at runtime. You can for example:
  • prompt the user to choose the runtime language the first time the application is started.
  • implement an option (menu option or button for example) allowing the user to change the current language of the application.
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment