TranslationLookupGet
- Last UpdatedOct 29, 2026
- 1 minute read
TranslationLookupGet is a built-in function that gets the translation of a specified source text, using a lookup map that was previously loaded into memory by the TranslationLookupLoad function.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
TranslationLookupGet |
Translation |
Synchronous |
Yes |
Supported |
Supported |
Not supported |
Not supported |
Supported (see Notes below) |
Syntax
TranslationLookupGet(numTranslationLookupID,strSource)
numTranslationLookupID
The ID number of the lookup map that you want to use, as it was returned by the TranslationLookupLoad function. Valid values range from 0 to 255.
strSource
The source text for which you want to get the translation.
Return value
If this function is successfully executed, it returns the translation of the specified source text. Otherwise, it returns one of the following possible values:
|
Value |
Description |
|---|---|
|
strSource |
Source text returned untranslated, because it was not found in the lookup map. |
|
-1 |
Function executed from the Viewer module, or other internal error. |
|
-2 |
Invalid parameter(s). |
|
-3 |
Other error. |
Notes
This function is supported on Mobile Access, but it must be called in a project screen as it is being viewed in the Mobile Access web interface. For more information, see TranslationLookupLoad.
Examples
Get the translation of "Tank #1", using the lookup map specified by the ID number stored in the tag MyLookupID:
TranslationLookupGet(MyLookupID,"Tank #1")
Load a lookup map for translating from "English-United States (1033)" to "Portuguese-Brazil (1046)", and then use it to get the translation of "Tank #1":
TranslationLookupGet(TranslationLookupLoad(1033,1046),"Tank #1")