Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtLocalize2(3)		   Library Functions Manual	       XmtLocalize2(3)

NAME
       XmtLocalize2(),	XmtLocalize(),	XmtLocalizeWidget() - look up a	trans-
       lated 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)

ARGUMENTS
       INPUTS

	    w	   Any	widget	in  the	 application, or, for XmtLocalize Wid-
		   get(), the widget for which the localization	is being  per-
		   formed.

	    default_string
		   The	untranslated  version of the string; used if no	trans-
		   lated 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.

DESCRIPTION
       These functions provide a way  to  internationalize  an	application-by
       looking	up  translations for any strings that would otherwise be hard-
       coded 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 specifica-
       tion 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 ALSO
       Chapter 3, Displaying Text.

Xmt				  Motif	Tools		       XmtLocalize2(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmtLocalize2&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help