Mac Developer Library Developer


This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • To learn how the manual is organized or to learn about command syntax, read the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Developer Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.

LOCALE(1)                 BSD General Commands Manual                LOCALE(1)

     locale -- display locale settings

     locale [-a|m]
     locale [-ck] name [...]

     locale displays information about the current locale, or a list of all available locales.

     When locale is run with no arguments, it will display the current source of each locale category.

     When locale is given the name of a category, it acts as if it had been given each keyword in that cate-gory. category.
     gory.  For each keyword it is given, the current value is displayed.

     -a       Lists all public locales.

     -c name ...
              Lists the category name before each keyword, unless it is the same category as the previously
              displayed keyword.

     -k name ...
              Displays the name of each keyword prior to its value.

     -m       Lists all available public charmaps.  Darwin locales do not support charmaps, so list all
              CODESETs instead.

     The following operand is supported:

     name is the name of a keyword or category to display.  A list of all keywords and categories can be
     shown with the following command:

     locale -ck LC_ALL

     LANG         Used as a substitute for any unset LC_* variable.  If LANG is unset, it will act as if set
                  to "C".  If any of LANG or LC_* are set to invalid values, locale acts as if they are all

     LC_ALL       Will override the setting of all other LC_* variables.

     LC_COLLATE   Sets the locale for the LC_COLLATE category.

     LC_CTYPE     Sets the locale for the LC_CTYPE category.

     LC_MESSAGES  Sets the locale for the LC_MESSAGES category.

     LC_MONETARY  Sets the locale for the LC_MONETARY category.

     LC_NUMERIC   Sets the locale for the LC_NUMERIC category.

     LC_TIME      Sets the locale for the LC_TIME category.

     localedef(1), localeconv(3), nl_langinfo(3), setlocale(3)

     The locale utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').

     locale appeared in Mac OS X 10.4

Darwin                          August 27, 2004                         Darwin

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation with the feedback links below.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.