Common Desktop Environment: Internationalization Programmer's Guide

Labels and Buttons

Table 2-2 lists the localized resources that are used as labels. Many of them are of type XmString. The rest are of type color or char*. See the Motif 1.2 Reference Manual for detailed descriptions of these resources. In each case, the application should not hardcode these resources. If resource values need to be specified by the application, it should be done with the app-defaults file, ensuring that the resource can be localized.

Only the widget class resources are listed here; subclasses of these widgets are not listed. For example, the XmDrawnButton widget class does not introduce any new resources that are localized. However, it is a subclass of the XmLabelWidget widget class; therefore, its accelerator resource, acceleratorText resource, and so on, are also localized and should not be hardcoded by an application.

Table 2-2 Localized Resources

Widget Class 

Resource Name 

Core

*background: [The foreground and background colors are not localized due to restrictions in the X protocol that require color names to be limited to the portable character set. Localized color names are left to applications to provide a localized database to map to a name encoded with the portable character set.]

XmCommand

*command:

XmCommand

*promptString:

XmFileSelectionBox

*dirListLabelString:

XmFileSelectionBox

*fileListLabelString:

XmFileSelectionBox

*filterLabelString:

XmFileSelectionBox

*noMatchString:

XmLabel[Gadget]

*accelerator:

XmLabel[Gadget]

*acceleratorText:

XmLabel[Gadget]

*labelString:

XmLabel[Gadget]

*mnemonic:

XmList

*stringDirection:

XmManager

*stringDirection:

XmMessageBox

*cancelLabelString:

XmMessageBox

*helpLabelString:

XmMessageBox

*messageString:

XmMessageBox

*okLabelString:

XmPrimitive

*foreground:1

XmRowColumn

*labelString:

XmRowColumn

*menuAccelerator:

XmRowColumn

*mnemonic:

XmRowColumn(SimpleMenu*)

*buttonAccelerators:

XmRowColumn

*mnemonic:

XmRowColumn

*mnemonic:

XmRowColumn

*mnemonic:

XmRowColumn

*mnemonic:

XmSelectionBox

*applyLabelString:

XmSelectionBox

*cancelLabelString:

XmSelectionBox

*helpLabelString:

XmSelectionBox

*listLabelString:

XmSelectionBox

*okLabelString:

XmSelectionBox

*selectionLabelString:

XmSelectionBox

*textAccelerators:

Note that the XmRowColumn widget has additional string resources that may be localized. These resources are listed in the XmRowColumn man page, under the heading "Simple Menu Creation Resource Set." As the title implies, these resources affect only RowColumn widgets created with the XmCreateSimpleMenu() function. The resources affected are: *buttonAccelerators, *buttonAcceleratorText, *buttonMnemonics,*optionLabel, and *optionMnemonic. These resources are not included in Table 2-2 because they are rarely used and apply to RowColumn only when creating a simple menu.