[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

National Language Support Guide and Reference

Subroutines for National Language Support

This chapter guides programmers in using subroutines when developing portable internationalized programs. Use standard Open Group, ISO/ANSI C, and POSIX functions to maximize portability.

The following topics are covered in this chapter:

Note
Do not use the layout subroutines in the libi18n.a library unless the application is doing presentation types of services. Most applications deal with logically ordered text.

Locale Subroutines

Programs that perform locale-dependent processing, including user messages, must call the setlocale subroutine at the beginning of the program. This call is the first executable statement in the main program. Programs that do not call the setlocale subroutine in this way inherit the C or POSIX locale. Such programs perform as in the C locale, regardless of the setting of the LC_* and LANG environment variables.

Other subroutines are provided to determine the current settings for locale data formatting. For more information about these subroutines, see Setting the Locale.

The locale of a process determines the way that character collation, character classification, date and time formatting, numeric punctuation, monetary punctuation, and message output are handled. The following section describes how to set and access information about the current locale in a program using National Language Support (NLS).

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]