|
NAMEXmtLocalize2(), XmtLocalize(), XmtLocalizeWidget() - look up a translated version of a string in the resource database.SYNOPSIS#include <Xmt/Xmt.h>
String XmtLocalize2(Widget w, String default_string, String category, String tag) String XmtLocalize(Widget w, String default_string, String tag) String XmtLocalizeWidget(Widget w, String default_string, String tag) ARGUMENTSINPUTS
RETURNS 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. DESCRIPTIONThese 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: _Messages_.language.territory.codeset.category.tag 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. SEE ALSOChapter 3, Displaying Text.
Visit the GSP FreeBSD Man Page Interface. |