nl_init(S) 6 January 1993 nl_init(S) Name nl_init - initializes native language support operation Syntax cc . . . -lintl int nl_init (lang) char * lang; Description The nlinit routine is provided as an alternative interface to the setlocale(S) routine, for programs written to the X/OPEN Portability Guide standard. However, nlinit has been withdrawn from XPG3. The nlinit routine initializes native language support operation for the language identified by lang, which is a pointer to a string containing settings of language, territory and codeset as defined for the LANG environment variable (see environ(M)). Typically, nlinit is used to bind program operation to the user's speci- fied language requirements, for example: nl_init(getenv("LANG")); A call to nlinit fails if the string pointed to by lang does not iden- tify a valid language/territory/codeset combination. In this case, operation continues for the language identified on the last successful call. Return value If successful, nlinit returns 0 (zero). Otherwise, -1 is returned. Notes Calls to nlinit can be used to switch operation from one supported lan- guage to another. It is not necessary to call nlinit to set the initial language for an application; this is done by the automatic setlocale call at program startup. The nlinit routine is not as flexible an interface as that provided by setlocale. See also environ(M), getenv(S), locale(M), setlocale(S) Standards conformance nlinit is an extension of AT&T System V provided by the Santa Cruz Operation.