ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Example: Choosing the application languages according to the values read in a INI file
Example: Choosing the application languages according to the values read in a INI file
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)Ajax
The following example illustrates how to read the application runtime language in a "MYAPP.INI" file.
Res = INIRead("EXEC", "LANGUAGE", "", "MYAPP.INI")
IF Res = "" THEN Error("Error in MYAPP.INI")
SWITCH Res
CASE "FRENCH": // French
 Nation(nationFrench)
CASE "ENGLISH": // English
 Nation(nationEnglish)
 IF LoadError("ENGLISH.WDM")>0 THEN
Error("File of messages not found." , ...
 "Messages displayed in French.")
 END
CASE "SPANISH": // Spanish
 Nation(nationSpanish)
 IF LoadError("SPANISH.WDM")>0 THEN
Error("File of messages not found.", ...
"Messages displayed in French.")
 END
END
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help