NLGETLANG(3X)
NAME
nlgetlang − return the current user, data, or system default language
SYNOPSIS
short nlgetlang(function, err)
short function;
unsigned short err[2];
DESCRIPTION
Nlgetlang looks for a LANG string in the user’s environment. If it finds it, it returns the corresponding integer listed in langid (5). Otherwise, or if the value of function is not valid, it returns 0 and sets the err parameter.
The 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
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, another HP operating system. See portnls(5) for more information on the use of this routine. Use the Native Language Support routines for C programmers described on hpnls(5) for HP-UX NLS support.
AUTHOR
Nlgetlang was developed by HP.
SEE ALSO
getenv(3C), currlangid(3C), portnls(5).
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989