3 .\" This file and its contents are supplied under the terms of the
4 .\" Common Development and Distribution License ("CDDL"), version 1.0.
5 .\" You may only use this file in accordance with the terms of version
8 .\" A full copy of the text of the CDDL should have accompanied this
9 .\" source. A copy of the CDDL is also available via the Internet at
10 .\" http://www.illumos.org/license/CDDL.
13 .\" Copyright (c) 2014 Joyent, Inc. All rights reserved.
14 .\" Copyright 2014 Garrett D'Amore <garrett@damore.org>
16 .TH USELOCALE 3C "Jun 24, 2014"
19 uselocale \- get and set the locale for an individual thread
25 \fBlocale_t\fR \fBuselocale\fR(\fBlocale_t\fR \fIloc\fR);
31 function is used to obtain and set the current locale for a thread. When
32 a thread is created, it uses the global locale as specified by calls to
39 then no change is made to the thread's locale setting. This can be used
40 to query the thread's locale without making any change.
46 then the thread will use the global locale, undoing the effect of any
47 prior call to establish a thread-specific locale.
49 Otherwise the thread will use the supplied
51 locale object as a thread-specific locale. Changes to the global
52 locale, or to the locale of any other thread, will not affect this thread.
54 Locale objects for use with
56 can be created with the functions
61 Upon successful completion, the
63 function always returns the previous locale that was set. If no locale
64 was previously set, the global locale,
65 .BR LC_GLOBAL_LOCALE ,
66 is returned. On failure, the
72 to indicate the error.
76 An invalid locale was encountered or an internal error occurred that
77 caused the system to be unable to update the locale.
83 ATTRIBUTE TYPE ATTRIBUTE VALUE
85 Interface Stability Standard