GetParmPhrase
Description: | Returns parameterized text in the currently selected language for a given phrase identifier key. |
Returns: | Text |
Usage: ![]() |
Script or Steady State |
Function Groups: |
String and Buffer |
Related to: | GetPhrase | GetParmPhraseForLang |
Format: ![]() |
\GetParmPhrase(PhraseKey[, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9]) |
Parameters: |
PhraseKey |
Required. The identifying key for a phrase. May be a string ID that uniquely identifies given text. |
P0 through P9 |
Any text that will be substituted into placeholders in the phrase matching the index of the parameter. (%0 through %9) |
Comments: |
The phrase need not have the %n placeholders in ascending numerical order, nor is one parameter required to be used exactly once. Some translations may not require a parameter at all while other parameters may occur multiple times. A maximum of 10 parameters are supported. The Language property in the caller's scope is used to specify the language name (e.g. en). Defaults to the Windows system's language. |
Example:
"Pump is Stopped"
EN TPPhrase,Pump is %0
FR TPPhrase,La pompe est %0
\GetParmPhrase("TPPhrase", Running ? \GetPhrase("RunningLabel") : \GetPhrase("StoppedLabel"));
This dynamic phrase will say that the pump is running or stopped in either French or English depending on the state of the pump at the time this runs.