s = symbol_name.getLabel(ʃlanguage := language_nameʅ);
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.
The function returns the symbol label.
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