• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
        • Symbol.getName Function
        • Symbol.getLabel Function
        • Symbol.getJson Function
        • Symbol.getValueJson Function
        • Symbol.updateValueFromJson Function
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Symbol.getLabel Function

Format
s = symbol_name.getLabel(ʃlanguage := language_nameʅ);
Description
The Symbol.getLabel function returns the label for a symbol. Many symbols do not have a label, in which case the name is returned. However, when the function is used with a dictionary item, the label, as defined in the dictionary, is returned. When called on an object passed to a function by reference, the label of the original symbol is returned.
An optional named argument allows you to get the label in a particular language, defined by the string language_name. If undefined or blank, the label for the current language is returned. If specified, the label for the language is returned. If no label exists for that language, the function returns a blank string.
Return Value
The function returns the symbol label.
Example
errmsg("%s", BIRD_NAME.getLabel());                 // Bird Name
errmsg("%s", BIRD_NAME.getLabel(language := "FR")); // Nom de l'oiseau

// set the current language to French
setlanguage("FR");

errmsg("%s", BIRD_NAME.getLabel());                 // Nom de l'oiseau
errmsg("%s", BIRD_NAME.getLabel(language := "EN")); // Bird Name
See also: Symbol.getName Function, GetLabel Function