uselocale(3)

uselocale3

Set the per-thread locale

Usage

#include <xlocale.h>

locale_t

uselocale(locale_t loc);

Overview

Sets the per-thread locale to loc. Specify LC_GLOBAL_LOCALE to turn off any per-thread locale. Pass NULL to return the current value of the per-thread locale (or LC_GLOBAL_LOCALE) without changing the locale.

Return values

Returns the previous locale, or LC_GLOBAL_LOCALE if no per-thread locale was in effect.

Releases

135 releases since Mac OS X 10.4; the text changed 1 time.

  1. 10.4–10.4.11
  2. 10.5–26.5

From Libc 1752.120.2 in macOS 26.5. Parsed by carta from the page's mdoc source.