Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ idtolang(3C) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nl_init(3C)

nl_langinfo(3C)

setlocale(3C)

hpnls(5)

lang(5)

langinfo(5)

LANGINFO(3C)

NAME

langinfo, langtoid, idtolang, currlangid − NLS information about native languages

SYNOPSIS

#include <nl_types.h>
#include <langinfo.h>

char ∗langinfo (langid, item)
int langid;
nl_item item;

int langtoid (langname)
const char ∗langname;

char ∗idtolang (langid)
int langid;

int currlangid ( )

DESCRIPTION

Note.  All functions defined on this page are obsolete.  Use of nl_langinfo(3C) is recommended as a replacement for langinfo.

Langinfo returns a pointer to a null-terminated string containing information relevant to a particular language or cultural area defined in the program’s locale (see setlocale(3C)). Langinfo effectively calls langinit (see nl_init(3C)) to load the program’s locale according to the language specified by langid.

Currlangid looks for a LANG string in the user’s environment.  If it finds one, currlangid returns the corresponding integer listed in lang(5). Otherwise, it returns 0 to indicate a default to native-computer, the method used before NLS was available. 

Idtolang takes the integer langid and attempts to return the corresponding character string defined in lang(5). If langid is not found, an empty string is returned. 

Langtoid is the inverse of idtolang: it attempts to convert a string to a language ID, returning 0 to indicate native-computer if no match is found. 

EXTERNAL INFLUENCES

Locale

The string returned by langinfo for a particular item is determined by the locale category specified for that item in langinfo(5).

International Code Set Support

Single- and multi-byte character code sets are supported. 

WARNINGS

Langinfo returns a pointer to a static area that is overwritten on each call. 

AUTHOR

Langinfo was developed by HP. 

SEE ALSO

nl_init(3C), nl_langinfo(3C), setlocale(3C), hpnls(5), lang(5), langinfo(5). 

STANDARDS CONFORMANCE

nl_langinfo: XPG2, XPG3

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026