The locale of a process determines the way character collation, character classification, date and time formatting, numeric punctuation, monetary punctuation, and message output are handled. Every internationalized program must set the current locale using the setlocale subroutine. This subroutine allows a process to change or query the current locale by accessing locale databases. The localeconv subroutine retrieves information about these categories, places the information in a structure of type lconv as defined in the locale.h file, and returns a pointer to this structure.
Responses can be regular expressions as well as simple strings.
The rpmatch subroutine is not an industry-standard subroutine. Portable applications should not assume that this subroutine is available. The return value is a string specifying the current locale for Category . This action allows the program to temporarily change the locale to a new locale. After processing is complete, the locale can be returned to its original state.