NWLsetlocale(3nw)
NWLsetlocale --
initializes implementation-defined native locale
Synopsis
#include <time.h> or #define NWL_EXCLUDE_TIME
#include <stdio.h> or #define NWL_EXCLUDE_FILE
#include <nwlocale.h>
char NWFAR
NWAPI NWLsetlocale
(int category,
const char NWFAR
locale);
Description
The parameters are as follows:
- category
-
(IN) Specifies the locale categories.
- locale
-
(IN) Points to a locale string.
Return values
- NULL
-
Failure
- Non-NULL
-
Pointer to the Country ID
Notices
You MUST call NWLsetlocale before calling any locale-sensitive
functions. Typically NWLsetlocale is called with the following
parameters:
NWLsetlocale(LC_ALL, ");
After calling NWLsetlocale, all locale-sensitive functions will
use the locale information set by NWLsetlocale.
locale can have the following values:
- ``
-
Initialize the implementation-defined native environment.
- NULL
-
Query for the current locale country ID, without initializing the
environment.
Specifying category and initializing internal data structures can
be done for that category only. This method uses less initialization time,
but does not call functions affected by an uninitialized category.
Valid entries for category follow:
- LC_ALL
-
0
- LC_COLLATE
-
1
- LC_CTYPE
-
2
- LC_MONETARY
-
3
- LC_NUMERIC
-
4
- LC_TIME
-
5
The country ID is a three-digit string defined by IBM. These IDs are based
on the international phone prefix for a given country. For example, USA
is ``001'. Finland is ``358'. See
NWInitUnicodeTables(3nw)
for a list of country IDs.
Services
Internationalization
NCP calls
None
References
NWLlocaleconv(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.