ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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 application only: use translated messages in a C application (WINDEV 5.5 compatible mode)
  • WINDEV application only: Using translated messages in a C application
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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. Launch the WDINT wizard: under the "Project" pane, in the "Translate" group, pull down "Translate" and select "WDInt - Framework translation".
  2. Select "Reintegrate the translated messages into the WDM translation file". Proceed to the next step of the wizard.
  3. Select:
    • The wdmsg file containing the translated resources. This file was created when translating with WDTRAD.
      Note: If you have chosen to use a message file in TXT or ".fic" format, select the file corresponding to the language to be reintegrated..
    • 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. Proceed 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.
    • On 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 translation WDM file must be present next to the executable (in test mode, this file must therefore be present in the project's EXE sub-directory).
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:
// LANGUE est un sélecteur 
SWITCH LANGUE 
	CASE 1: //Français 
		Nation(nationFrench) 
	CASE 2: //Espagnol 
		Nation(nationSpanish) 
		IF LoadError("ESPAGNOL.WDM")>0 THEN 
			Error("Fichier des messages en espagnol non trouvé. ", ...
				"Les messages s'afficheront en français.") 
	END 
END
WINDEVExternal language

WINDEV application only: use translated messages in a C application (WINDEV 5.5 compatible mode)

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 Francais = 5;
int Espagnol = 7;
// LANGUE est un sélecteur
APPELWD("ECRAN,RECUPERE, LANGUE");
if (WdEntier==1) { // Français
APPELWD("NATION,%d",Français);
}
else if (WdEntier==2) { // Espagnol
APPELWD("NATION,%d",Espagnol);
APPELWD("BIBLI,ERREUR,ESPAGNOL.WDM");
if (WdEntier>0) {
APPELWD("ERREUR,Fichier des messages non trouvé");
}
}
WINDEVExternal language

WINDEV application only: Using translated messages in a C application

This example shows how to use the translated text in an application developed in C.
For more details, see External language.
int Francais = 5;
int Espagnol = 7;
//LANGUE est un sélecteur
nWDEvalue("MaFenêtre.Langue");
if(nWDGetValeurRetour()==1) {  // Français
nWDExecute("Nation(%d)");
}
else if(nWDGetValeurRetour()==2) { // Espagnol
nWDExecute("Nation(%d)",Francais);
nWDExecute("ChargeErreur(\"ESPAGNOL.WDM\")");
if(nWDGetValeurRetour()>0) {
nWDExecute("Erreur(\"Fichier des messages non trouvé\")");
}
}
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/14/2024

Send a report | Local help