|w||Any widget in the application, or, for XmtLocalize Widget(), the widget for which the localization is being performed.|
|default_string||The untranslated version of the string; used if no translated version is found in the resource database.|
|category||A module name for the string to be looked up.|
|tag||The name of the string to be looked up.|
A translated version of default_string, or default_string, if no translated version could be found. The returned value should not be modified or freed by the application.
These functions provide a way to internationalize an application-by looking up translations for any strings that would otherwise be hardcoded into the executable. They make it easy for a translator or site administrator or user to provide translations in a resource file.
XmtLocalize2() looks in the resource database for a resource specification that matches this template:
In this resource specification, category and tag are the specified arguments to XmtLocalize2(), and language, territory, and codeset are the language, territory, and codeset parts of the Xt language string, usually specified by the LANG environment variable. If a resource specification that matches is found, XmtLocalize2() returns its value, and if no such resource is found, XmtLocalize2() returns default_string. The resource specification need not match exactly, of course-the standard resource file wildcards can be used as normal.
XmtLocalize() is a simplified version of XmtLocalize2() that omits the category argument in its resource lookup.
XmtLocalizeWidget() is another simplified version of XmtLocalize2() for use by widget writers. It passes the class name of the specified widget as the category value.
If the XMTDEBUGLOOKUP environment variable is set, these functions will print helpful debugging messages as they look up localized strings. Compile Xmt with the -NDEBUG flag to disable this feature.
Chapter 3, Displaying Text.
|Xmt||XMTLOCALIZE2 (3)||Motif Tools|