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

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

DESCRIPTION
     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 argu-
     ments to XmtLocalize2(), and language, territory, and codeset are the  lan-
     guage,  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 re-
     source is found, XmtLocalize2() returns default_string. The resource speci-
     fication need not match exactly, of course-the standard resource file wild-
     cards can be used as normal.

     XmtLocalize() is a simplified version of XmtLocalize2() that omits the cat-
     egory 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)

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

home | help