AltText class

An AltText object represents a collection of language alternates for a localized property of a session, certificate or user stored in a CP2 dataset. Each AltText object retains a reference to its underlying data structure, so it can be used for both reading and writing.

Getters [R]

isEmpty( ) : Boolean
Returns true if the collection of alternates is empty, false otherwise. The collection is empty if the underlying property is absent or if no alternates are listed for the property.
getLocalizedText( genericLang : String, specificLang: String ) : String
Returns one of the collection's alternates according to the rules described for the getLocalizedText() function in the XMP data model.
getText( ) : String
Returns one of the collection's alternates, selected by preference in the following order: the English language string, the default string, or any other language string. The getter returns a non-empty string as long as there is at least one alternate string.

Setters [W]

These functions may be invoked only on AltText objects associated with the active session or with a certificate in the active session. Invoking them on any other AltText object is a programming error and has unpredictable results.
setLocalizedText( value : String, genericLang : String, specificLang: String )
Adds or replaces one of the collection's alternates according to the rules described for the setLocalizedText() function in the XMP data model.
setText( value : String )
Sets the specified string as the English language string and erases all other alternates from the collection (to avoid discrepancies between the meaning of existing alternates and the new string).