ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Tools / Translation tools / WDInt
  • Overview
  • How to?
  • Reintegrating the translated text and generating the translation file
  • Loading the WDM translation file
  • Remarks
  • Examples
  • Using translated text in a project developed in WLanguage
  • WINDEV applications only: Using the translated text in an application developed in C (mode compatible with WINDEV 5.5)
  • WINDEV applications only: Using the translated text in an application developed in C
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
Reintegrating translated text into a project
Overview
Once all the resources used in your project (framework libraries, Automatic Application Features (AAF), etc.) have been translated, you must:
  • Reintegrate the translated text (".wdmsg" files) and generate the WDM translation file.
  • Copy the WDM translation file to your project's "EXE" directory.
  • Load the WDM translation file(s).
How to?

Reintegrating the translated text and generating the translation file

To reintegrate the translated text and generate the corresponding translation file:
  1. Start the WDINT wizard: on the "Project" tab, in the "Translate" group, expand "Translate" and select "WDInt - Framework translation".
  2. Select "Reintegrate the translated messages into the WDM translation file". Go to the next step of the wizard.
  3. Select:
    • The wdmsg file containing the translated resources. This file was created when translating with WDTRAD.
      Remark: If you used a TXT or ".fic" file, select the file corresponding to the language to reintegrate.
    • Select the language of the translations to be reintegrated.
    • Select the WDM translation file to be generated.
      By default, the name of the generated WDM file corresponds to the language in which the text will be reintegrated. Go to the next step of the wizard.
  4. WDINT reintegrates the translated text into the selected WDM translation file.

Loading the WDM translation file

Each WDM translation file can be associated with the corresponding language:
  • in the project description:
    • On the "Project" tab, in the "Project" group, click "Description".
    • Go to the "Languages" tab of the project description.
    • In the "Miscellaneous" tab, choose the extraction file in "Translation WDM file".
  • programmatically using LoadError or Library,Error for external languages (in WINDEV applications only). For more details, see "Examples".
Remark: The WDM translation file must be located in the same directory as the executable (in test mode, this file must be in the project's EXE subdirectory).
Remarks
  • To define the runtime language of your project (captions, messages, etc.), use Nation.
  • If the WDM translation file is not loaded, the framework messages (".DLL" files), the AAFs and the advanced control interfaces will be displayed:
    • in French if you are using a French version of WINDEV, WEBDEV or WINDEV Mobile to develop your project.
    • in English if you are using an English version of WINDEV, WEBDEV or WINDEV Mobile to develop your project.
  • When the setup is created, the files in the "EXE" directory of the project are automatically included in the setup program.
Examples

Using translated text in a project developed in WLanguage

This example shows how to use the translated text in a project developed in WLanguage:
// LANGUAGE is a radio button 
SWITCH LANGUAGE 
CASE 1: //French 
Nation(nationFrench) 
CASE 2: //Spanish 
Nation(nationSpanish) 
IF LoadError("SPANISH.WDM")>0 THEN 
Error("File of messages in Spanish not found. ", ...
"The messages will be displayed in French.") 
END 
END
WINDEVExternal language

WINDEV applications only: Using the translated text in an application developed in C (mode compatible with WINDEV 5.5)

This example shows how to use the translated text in an application developed in C (mode compatible with WINDEV 5.5).
For more details, see External language.
int French = 5;
int Spanish = 7;
// LANGUAGE is a radio button
CALLWD("SCREEN,GET, LANGUAGE");
if (WdInt==1) { // French
CALLWD("NATION,%d",French);
}
else if (WdInt==2) { // Spanish
CALLWD("NATION,%d",Spanish);
CALLWD("LIBRARY,ERROR,SPANISH.WDM");
if (WdInt>0) {
CALLWD("ERROR,File of messages not found");
}
}
WINDEVExternal language

WINDEV applications only: Using the translated text in an application developed in C

This example shows how to use the translated text in an application developed in C.
For more details, see External language.
int French = 5;
int Spanish = 7;
//LANGUAGE is a radio button
nWDEvaluate("MyWindow.Language");
if(nWDGetReturnValue()==1) {  // French
nWDExecute("Nation(%d)");
}
else if(nWDGetReturnValue()==2) { // Spanish
nWDExecute("Nation(%d)",French);
nWDExecute("LoadError(\"SPANISH.WDM\")");
if(nWDGetReturnValue()>0) {
nWDExecute("Error(\"File of messages not found\")");
}
}
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/17/2023

Send a report | Local help