nlgetlang(3X)
NAME
nlgetlang() − return the current user, data, or system default language
SYNOPSIS
#include <portnls.h>
short int nlgetlang(short int function, unsigned short int err[2]);
DESCRIPTION
nlgetlang() looks for a LANG string in the user’s environment. If it finds it, it returns the corresponding integer as described in lang(5). Otherwise, or if the value of function is not valid, it returns 0 and sets the err parameter.
Arguments to nlgetlang() are used as follows:
function A short integer that specifies which language is returned.
Value Description
1 User language
2 Data language
3 System default language
err The first element of this array contains the error number. The second element is always zero. If the call is successful, both elements contain zero.
Error # Meaning
1 Native Language Support file(s) not found
2 Specified language not configured
3 Invalid function value
4 No language specified for nlgetlang() to access
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
nlgetlang() returns the language ID as a short integer. In case of error, zero is returned.
WARNINGS
This routine is provided for compatibility with MPE, a proprietary HP operating system. See portnls(5) for more information on the use of this function. Use the Native Language Support routines for C programmers described by hpnls(5) for HP-UX NLS support.
AUTHOR
nlgetlang() was developed by HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 10.20: July 1996