TranslationLookupLoad
- Last UpdatedOct 29, 2026
- 3 minute read
TranslationLookupLoad is a built-in function that creates a lookup map from the Translation Table for the specified source and target languages, and then it loads the map into memory so that it can be used by the TranslationLookupGet function.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
TranslationLookupLoad |
Translation |
Synchronous |
No |
Supported |
Supported |
Not supported |
Not supported (see Notes below) |
Executed on Server (see Notes below) |
Syntax
TranslationLookupLoad(numSourceLanguageID,numTargetLanguageID)
TranslationLookupLoad ( numSourceLanguageID , numTargetLanguageID )
numSourceLanguageID,numTargetLanguageID
The ID numbers of the source and target langauges, respectively. Both languages must be already configured in the Translation Table, and the ID numbers are shown in parentheses next to those languages — for example, "English-United States (1033)". For more information about the ID numbers, see Notes below.
Return value
If this function is successfully executed, it returns the ID number (from 0 to 255) of the lookup map that was created and loaded. The ID number of the lookup map is separate and different from the ID numbers of the source and target languages. You can subsequently use the ID number of the lookup map as an argument when you call the TranslationLookupGet and TranslationLookupClose functions.
Otherwise, this function returns one of the following possible values:
|
Value |
Description |
|---|---|
|
-4 |
The source language is the same as the target language, or the specified languages have not been configured in the Translation Table. |
|
-3 |
Cannot have more than 256 lookup maps loaded in memory at the same time. |
|
-2 |
Invalid parameter(s). |
|
-1 |
Function executed from the Viewer module, or other internal error. |
Notes
The Translation Table uses Microsoft Locale ID (LCID) values to identify languages. Microsoft changed how it handles language identifiers in older versions of Windows, which effectively deprecated LCID in the operating system, but we hardcoded the values into this software and continue to use them in order to maintain compatibility across all platforms and with existing projects.
When you call this function, you can specify any two languages that have been configured in the Translation Table, even if they were both originally configured as target languages. When the lookup map is created, it automatically cross-references the specified languages. For example, if you configured the Translation Table for your project to include both an English-to-Spanish translation and an English-to-Portuguese translation, you can then specify Spanish and Portuguese when you call this function.
You can have up to 256 lookup maps loaded in memory at the same time, but each map uses system resources and that can affect runtime performance. You should use the TranslationLookupClose function to close a map when you are done with it.
The Translation Table and all lookup maps created from it are maintained by the project runtime server. As such, this function is not supported on Thin Clients; it must be called in a procedure, script, or worksheet that is executed on the server. If you want to trigger the execution of this function from a Thin Client, either configure the worksheet to have an appropriate execution control or use the RunGlobalProcedureOnServer function.
This function is supported on Mobile Access, because the Mobile Access runtime maintains its own Translation Table separate from the project runtime server and the contents of the table are available only to the Mobile Access web interface. In order to create a lookup map from the Translation Table for Mobile Access, this function must be called in a project screen as it is being viewed in the Mobile Access web interface. Unfortunately, due to this fundamental difference between the project runtime server and the Mobile Access runtime, it is not possible to develop a project screen that behaves exactly the same for both.
Examples
Load a lookup map for translating from "English-United States (1033)" to "Portuguese-Brazil (1046)":
TranslationLookupLoad(1033,1046)