| United States-English |
|
|
|
![]() |
Common Desktop Environment: Internationalization Programmer's Guide > Chapter 2 Internationalization
and the Common Desktop EnvironmentLocalized Resources |
|
This section describes which widget and gadget resources are locale-sensitive. The information is organized by related functionality. For example, the first section describes those resources that are locale-sensitive for widgets used to display labels or to provide push-button functionality. Table 2-2 “Localized Resources” 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 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
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 “Localized Resources” because they are rarely used and apply to RowColumn only when creating a simple menu. Several widgets allow applications to set or read lists of items in the widget. Table 2-3 “Resources Used for Reading Lists” shows which widgets allow this and the resources they use to set or read these lists. Because the list items may need to be localized, do not hardcode these lists. Rather, they should be set as resources in app-defaults files, allowing them to be localized. The type for each list is XmStringList. Table 2-3 Resources Used for Reading Lists
Table 2-4 “Resources Used for Setting Titles and Icon Names” lists the resources used for setting titles and icon names. Normally, an application need only set the *title: and *iconName: resources. The encoding of each is automatically detected for clients doing proper locale management. All of these are of type *char or XmString. Table 2-4 Resources Used for Setting Titles and Icon Names
Table 2-5 “Locale-Sensitive Text[Field] Resources” lists the Text[Field] resources that are locale-sensitive or about which the developer of an internationalized application should know. Table 2-5 Locale-Sensitive Text[Field] Resources
Table 2-6 “Localized Resources for Input Method Customization” lists localized resources for customizing the input method. These resources allow the user or the application to control the input method that will be used for the specified locale, the policy to follow when creating an input context (per shell or per individual widget), and the preedit style (if applicable and available) that will be used. Table 2-6 Localized Resources for Input Method Customization
The table that follows shows widgets that may use the *layoutDirection resource. Table 2-7 The layoutDirection Resource
Table 2-8 “Pixmap Resources” lists pixmap resources. In some cases, a different pixmap may be needed for a given locale. Table 2-8 Pixmap Resources
For complete information on these resources, refer to Motif Programmer's Guide. Table 2-9 “Localized Font Resources” lists the localized font resources. All XmRenderTable resources are of type XmRenderTable. In almost all cases, a fontset should be used when specifying a rendition table. The only exception is when displaying character data that does not appear in the character set of the user (for example, displaying math symbols or dingbats). Table 2-9 Localized Font Resources
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||