1.TH setlocale 3 scc\-VERSION2.SH NAME3setlocale - query or modify the program's current locale4.SH SYNOPSIS5#include <locale.h>67char *setlocale(int category, const char *locale);8.SH DESCRIPTION9The10.BR setlocale ()11function allows querying and changing the active locale of the program,12either in full or in part.13When14.I locale15is not NULL,16the program locale is updated according to the given arguments.17The18.I category19argument selects which aspect of the locale to modify:2021.nf22Category Governs23LC_ALL All of the locale24LC_COLLATE String collation25LC_CTYPE Character classification26LC_MONETARY Formatting of monetary values27LC_NUMERIC Formatting of nonmonetary numeric values28LC_TIME Formatting of date and time values29.fi3031A32.I locale33value of34.B C35selects the minimal environment for C programs;36a value of37.B ""38selects the native environment of the host system.3940At program startup, the locale behaves as if41.BR setlocale (LC_ALL,"C")42had been called.43.SH RETURN VALUE44On success, a pointer to a string identifying the locale45associated with the specified46.I category47is returned.48If49.I locale50is NULL, the string describes the current locale for that category.51A subsequent call to52.B setlocale53with this string and category will restore that locale.54The returned string must not be modified by the program;55it may be overwritten by the next call to56.BR setlocale .57.SH STANDARDS58ISO/IEC 9899:1999 Section 7.11.1.1 Paragraph 1,2,3,4,6,7,859.SH SEE ALSO60.B locale.h(3)