GetStandardText
Returns a string from the standard texts for the required language, context, and label type.
If the standard text does not have a label for the requested language, context, or label type, the following rules are used:
▪If the label type does not exist, the base label type is used.
▪If the language does not exist for the requested context, the base language is checked for the same context.
▪If the context does not exist, the base language for the base context is used.
Syntax
GetStandardText(<message_full_name> [, <language>] [, <context>] [, <label_type>])
Parameters
<message_full_name>
Type: Text
FullName for the MDM field in the StandardTexts.mdd file. For more information, see Standard error messages.
<language>
Type: Text
(Optional.) The language name or code used to retrieve the label text. This can be one of the following:
▪Name: for example, ENU or ESN
▪LongName: for example, English (United States) or Spanish (Spain, International Sort)
When comparing the Language parameter against the LongName, it is compared with the entire LongName and also the language part without the country name that is in brackets.
▪langSENGLANGUAGE: for example, English or Spanish
▪langSNATIVELANGUAGENAME: for example, English or español
▪XMLName: for example, en-US or es-ES
The first matching language is used.
The default value is the output locale ID (LCID) that is provided by the environment is used. If the LCID is 0, the base language of the StandardTexts.mdd file is used.
<context>
Type: Text
(Optional.) The metadata context to use to retrieve the label text.
The default value is the Question context.
<label_type>
Type: Text
(Optional.) The metadata label to use to retrieve the label text. If not specified, the Label label-type is used.
(return)
Type: Text
A string from the standard texts for the required language, context, and label type.
Notes
You can specify new standard texts in the following locations:
▪in the StandardTexts block that is in the shared messages MDD file. The location of the shared messages MDD file is specified by the SharedMessagesMDD registry value: for more information, see Custom message texts and SharedMessagesMDD.
▪in an interview routing script, in a StandardTexts block of the interview metadata. (But they cannot be defined in the StandardTexts helper field of an individual question.)
A standard text in the interview metadata takes priority over one with the same name that is the shared messages MDD.
If you change the StandardText.mdd file, it might take up to 60 seconds for UNICOM Intelligence to load the new text.
Example
The following example gets the US English label for the NotFound field that is in the SampleMgmt block.
DisplayText = GetStandardText("SampleMgmt.NotFound", "en-US")
See also