*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> gettxt (3)              
Title
Content
Arch
Section
 

gettxt(3)

Contents


NAME    [Toc]    [Back]

       gettxt - Retrieves a text string from a message catalog

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       char *gettxt(
               const char *msgid,
               const char *dflt_str );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Specifies  the  message identification string.  The format
       of this string is discussed in more detail below.   Specifies
 the default string to use if the identified string is
       not found.

DESCRIPTION    [Toc]    [Back]

       A message  catalog  contains  text  strings  that  can  be
       accessed  by programs.  Message catalogs are created using
       the gencat and mkcatdefs commands. The  gettxt()  function
       searches  a  message  catalog for a specified text string.
       If the text string  is  available,  it  is  returned.   If
       attempts  to  retrieve the text string do not succeed, the
       specified default text string is used.

       You can request that messages be displayed in  a  specific
       language  by setting environment variables.  Likewise, you
       can also change the language in  which  the  messages  are
       displayed  by  invoking  the setlocale() function with the
       appropriate arguments.

       To retrieve a text string, the program must use  the  following
 format when specifying the msgid parameter:

       msgfilename:msgnumber

       The  arguments  are defined as follows: Specifies the message
 catalog that contains the localized  version  of  the
       text string.  Characters in the text string can be any set
       of characters excluding null (\0), the ASCII  symbols  for
       slash  (/),  and  the  colon (:).  Specified as a positive
       number only, this argument denotes the index of  the  text
       string in the message catalog.

       If the text string specified does not exist in the catalog
       associated with the locale setting, or if the message number
  exceeds  the bounds of the catalog, attempts are made
       to retrieve this  message  from  the  catalog  for  the  C
       locale.   Should  the  second attempt be unsuccessful, the
       text string specified by the dflt_str is used.

RESTRICTIONS    [Toc]    [Back]

       On this operating system, the gettxt() function parses the
       directory  locale  as described on the catopen(3) and catgets(3) reference pages.




RETURN VALUES    [Toc]    [Back]

       The string Message not found!!\n is returned if the  value
       for  the msgfilename argument is invalid, a catalog number
       has not been specified, the value for msgnumber is  not  a
       positive  number,  or a message could not be retrieved and
       the dflt_str parameter was not specified.

ERRORS    [Toc]    [Back]

       No errors are defined for this function.

SEE ALSO    [Toc]    [Back]

      
      
       Commands: gencat(1), mkcatdefs(1)

       Functions: catgets(3), catopen(3)



                                                        gettxt(3)
[ Back ]
 Similar pages
Name OS Title
XmTextGetStringWcs Tru64 A Text function that retrieves a copy of the wide character string value of a Text widget
XmTextGetStringWcs HP-UX A Text function that retrieves a copy of the wide character string value of a Text widget
XmTextGetStringWcs IRIX A Text function that retrieves a copy of the wide character string value of a Text widget
DXmCSTextGetMaxLength Tru64 Retrieves (returns) current maximum allowable length of the text in the compound string text widget.
DXmCSTextGetSelection Tru64 Retrieves the text selected in the compound string text widget.
DXmCSTextGetString Tru64 Retrieves all the text from the compound string text widget.
catgets FreeBSD retrieve string from message catalog
catgets OpenBSD retrieve string from message catalog
catgets NetBSD retrieve string from message catalog
DXmCSTextNumLines Tru64 Retrieves (returns) the number of visible lines in the compound string text widget.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service