OSF DCE Application Development Guide--Core Components
DCE Application Messaging
<. . .>
dce_msg_define_msg_table(hel_msg_table,
sizeof(hel_msg_table) / sizeof(hel_msg_table[0]),
&status);
dce_msg_translate_table( )
Makes a new copy of the specified in-memory message table (that is,
updates the table with the contents of a message table, which has
changed because of a change in locale).
Note that this routine will fail if the message catalog is not installed or if
LANG is not properly set, since the update depends on accessing the
contents of the message catalog (unlike the initial table setup, which is
done from the code in the dcecmpmsg.c file).
The following code fragment shows how dce_msg_translate_table( )
might be called to translate the in-memory table that was set up by the
call to dce_msg_define_msg_table() in the previous example:
#include <dce/dce.h>
#include <dce/dce_msg.h>
#include <locale.h>
#include "dcehelmsg.h"
char *loc_return;
unsigned32 status;
<. . .>
loc_return = setlocale(LC_MESSAGES, "C");
dce_msg_translate_table(hel_msg_table,
sizeof(hel_msg_table) / sizeof(hel_msg_table[0]),
&status);
3.3.4 DCE XPG4 Routines
The four routines in this group provide DCE versions of functionality of the XPG
messaging routines catopen(), catgets(), and catclose().
dce_msg_cat_open()
(DCE abstraction over catopen( )) Opens a message catalog identified by
a message ID. The routine returns a handle to the open catalog from
which messages will be extracted. This routine is intended for use by
applications (such as user interface programs) that display many
messages from a particular catalog.
The routine will fail if the message catalog is not installed or if LANG is
not properly set.
124245 Tandem Computers Incorporated 3− 15