uselocale - set/get the locale for the calling thread
#include <locale.h>
locale_t uselocale(locale_t newloc);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
The uselocale() function sets the current locale for
the calling thread, and returns the thread's previously current locale.
After a successful call to uselocale(), any calls by
this thread to functions that depend on the locale will operate as
though the locale has been set to newloc
.
The newloc
argument can have one of the following
values:
The calling thread's current locale is set to the specified locale.
The calling thread's current locale is set to the global locale determined by setlocale(3).
(locale_t) 0
The calling thread's current locale is left unchanged (and the current locale is returned as the function result).