Skip to main content

ReturnTranslationForConstant

Structure

ReturnTranslationForConstant(sEnglishPhrase)

Parameters

| Parameter | Type | Description
| sEnglishPhrase | String | the name of the constant that needs to be returned in translated form for the current language. |

Return Value

String

Description

This function returns the translation for a constant for the currently selected language. The translation is located specifically from within 'Units' logged in the file-based translation files configured in the 'Main Interface & Languages' tab in Language Settings. Important: Note that form-based text is not searched, only units. This function is very similar to the ReturnFileTranslation function, but instead of looking up based on the English phrase, this function looks up based on the constant's name. The constant name can be seen in Language Manager by selecting a Unit and then viewing the text in the first 'Constants' column. If a translation for the phrase is not found, then the original phrase is returned. Note: Constant names are unique across all units, so no unit name needs to be input into parameters.

Example

bPromptToChoose = True

if bPromptToChoose then

ShowMessage(ReturnTranslationForConstant("SChooseANameForTheExcelFile"))

End If |