Translate Method
- Last UpdatedNov 06, 2025
- 1 minute read
The Translate() method translates a specific string using the ID of the string, which is provided with the string as <id> or {id} at the end of the string, and the language ID of the user.
The input string must have the string ID included. If the string ID cannot be found in the language table to translate the string, the string that was passed in is returned by removing the string from the end of it.
'Declaration
Public Shared Function Translate( _
ByVal langId As DBInt, _
ByVal errorMessage As String _
) As String
public static string Translate(
DBInt langId,
string errorMessage
)
Parameters
- langId
- Required. The language ID.
- errorMessage
- Required. Holds the string to translate. The string must end with <id> or {id}, where id is the number representing the string ID.
Return Value
Returns the translated string if the string ID is found, or returns the passed-in string if the string ID is not found.