querylocale(3)

querylocale3

Look up the locale name or version for a specified category

Usage

#include <locale.h>

const char *

querylocale(int mask, locale_t locale);

Library

Standard C Library (libc, -lc)

Overview

Returns the name or version of the locale for the category specified by mask. The possible values for the mask are the same as those in newlocale(3), when requesting the locale name. Specify the bitwise OR of LC_VERSION_MASK and another mask value to request a version string. Version strings can be compared to detect changes to the locale's definition. The structure of the version string is unspecified. Currently, version information is only available for LC_COLLATE_MASK, and an empty string is returned for other categories. If more than one bit in the mask is set, not counting LC_VERSION_MASK, the returned value is undefined.

Releases

33 releases since FreeBSD 9.1-RELEASE; the text changed 19 times.

  1. 9.1
  2. 9.2
  3. 9.3
  4. 10.0
  5. 10.1
  6. 10.2
  7. 10.3
  8. 10.4
  9. 11.0
  10. 11.1
  11. 11.2
  12. 11.3
  13. 11.4
  14. 12.0
  15. 12.1
  16. 12.2
  17. 12.3
  18. 12.4
  19. 13.0–13.2
  20. 13.3–16.0

History

The querylocale() function first appeared in FreeBSD 9.1, and is based on the function of the same name in Darwin. LC_VERSION_MASK first appeared in FreeBSD 13.0.

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.