using the encoding for the current locale. To support a number of locales, the application needs to store string data in
separate files from the application code. The application must provide a separate file for each of the locales supported,
so that the program can read the appropriate file during localization.
However, since most Motif widgets use compound strings for representing textual data, a Motif application has to use
compound strings to display text. As we describe compound strings in this chapter, we'll discuss how to use them so
as not to interfere with the lower−level X internationalization features.
20.2 Creating Compound Strings
Almost all of the Motif widgets use compound strings to specify textual data. Labels, PushButtons, and Lists, among
others, all require their text to be given in compound string format, whether or not you require the additional
flexibility compound strings provide. The only widgets that don't use compound strings are the Text and TextField
widgets. As a result, you cannot use the compound string techniques for displaying text using multiple fonts.
However, in Motif 1.2, these widgets do support internationalized text output, so they can display text using multiple
character sets. For information on the internationalization capabilities of the Text and TextField widgets, see Section
#stexti18n.
A compound string (XmString) is made of three components: a tag, a direction, and text. The tag is an arbitrary
name that the programmer can use to associate a ...