ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Multilingual functions
  • Which syntax to use?
  • Managing the space characters
  • Displaying a message in an unavailable language
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
Warning
From version 26, this function is kept for backward compatibility. It is recommended to enter the message directly in the code. For more details, see Translating programming messages.
Retrieves a message found in the code of a program in the current language.
Remark: We advise you to directly use the multilingual strings in the code.
Example
// Retrieves and displays the message 2100
// found in the code of the "WIN_Menu" window
Info(MessTranslate(WIN_Menu, 2100))
// Retrieves and displays the message 2100
// found in the code
Info(MessTranslate(2100))
Syntax

Retrieving the message corresponding to the identifier (compatibility with version 5.5) Hide the details

<Result> = MessTranslate(<Message number>)
<Result>: Character string
Sought message in the current language.
<Message number>: Integer
Number of the message to display:
  • Number included between 1 and 500 (inclusive): the resource is sought in the project.
  • Number included between 2000 and 2499 (inclusive): the resource is sought in the current window.
  • Number included between 5000 and 5499 (inclusive): the resource is sought in the current class.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS WidgetApple WatchMac CatalystUser code (UMC)Ajax

Retrieving the message associated with a project element Hide the details

<Result> = MessTranslate(<Element> , <Message number>)
<Result>: Character string
Sought message in the current language.
<Element>: Character string
Object in which the resource must be sought.
  • Empty string (""): search in the current object.
  • ".": search in the project.
  • "Object name": search in the specified object.
<Message number>: Integer
Identifier of the message to find:
  • Message associated with the project: number included between 1 and 65535.
  • Message associated with a set of procedures: number included between 1 and 65535.
  • Message associated with a window: number included between 2000 and 65535.
  • Message associated with a report: number included between 2000 and 65535.
  • Message associated with a class: number included between 5000 and 65535.
Remarks

Which syntax to use?

We recommend that you use the first syntax.
To find resources whose identifiers are greater than the above-mentioned limits, you must use the first syntax.

Managing the space characters

The space characters entered at the end of messages are ignored. For example: "The customer: " becomes "The customer:". To force one or more space characters at the end of a message, you must use the non-breaking space character (Alt+0160, the 0 in front of 160 is mandatory).
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppUser code (UMC)Ajax

Displaying a message in an unavailable language

If a message was not translated for the specified language (the element is not associated with this language), the mechanism of preferred languages is used to display the requested information in another language, very close to the requested one.
Component: wd290vm.dll
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