Download 3 - Oracle Documentation

Transcript
4
•
•
Reference global external variables used by system libraries, such as:
char _cur_locale[][]
unsigned char _ctype[]
unsigned char _numeric[]
char *__time[]
struct _wctype _wcptr
int _lflag
Use both catgets() and gettext().
Using X/Open Message Catalogs
Although catgets() is the standard X/Open function, its programming
interface is not as convenient as gettext(). You must pass catgets() two
extra numeric parameters—one for the catalog descriptor, and another for the
message set number. Moreover, catgets() requires you to assign a numeric
message identifier to each message, which can make code confusing and
difficult to maintain. Message numbers can easily get out of sync with their
message strings.
Note – Sun recommends that programmers use gettext() instead, even
though it is not an official standard. SunOS and OpenWindows 3.3 both use
gettext() exclusively. If source portability is a concern, be advised that
gettext() source is freely available for integration into your product.
Writing Internationalized Code
57