GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtLocalize2(3) FreeBSD Library Functions Manual XmtLocalize2(3)

XmtLocalize2(), XmtLocalize(), XmtLocalizeWidget() - look up a translated version of a string in the resource database.

#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)

INPUTS
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.

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.

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:

_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.

Chapter 3, Displaying Text.
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.