HP 9000 User Manual page 143

Computers
Hide thumbs Also See for 9000:
Table of Contents

Advertisement

8
Initialization
The following sections provide more detailed information on:
• Special locales
• Special message catalogs
• Default message catalogs
• Programs that call
exec
Special Locales
The
setlocale
routine can set individual categories to specific locale values.
For example, to have a program run with French date and time conventions
and with Spanish sorting conventions, the following calls would establish the
desired locale:
#include <locale.h>
setlocale(LC_TIME,"french");
setlocale(LC_COLLATE,"spanish");
This use, however, defeats the adaptive nature of the NLS routines and is not
recommended. A preferred way to get the desired effect would be to use the
"standard" initialization and to set the NLS environment variables when the
program is run:
LC_TIME=french ; export LC_TIME
LC_COLLATE=spanish ; export LC_COLLATE
Special Message Catalogs
The
catopen
routine can specify a path for the message catalog, as in:
catd = catopen("/usr/special.cat" , 0);
This use, however, defeats the generality of
catopen
and is not recommended.
A preferred way to get the desired effect would be use the "standard"
initialization:
catd = catopen(" spec ial", 0);
Then set the NLS environment variable when the program is run:
8-10 Advanced NLS Topics

Advertisement

Table of Contents
loading

Table of Contents