Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

locale(1) [mojave man page]

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

NAME
locale -- display locale settings SYNOPSIS
locale [-a|m] locale [-ck] name [...] DESCRIPTION
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 category. For each keyword it is given, the current value is displayed. OPTIONS
-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. OPERANDS
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 ENVIRONMENT
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 unset. 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. SEE ALSO
localedef(1), localeconv(3), nl_langinfo(3), setlocale(3) STANDARDS
The locale utility conforms to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
locale appeared in Mac OS X 10.4 Darwin August 27, 2004 Darwin

Check Out this Related Man Page

locale(1)							   User Commands							 locale(1)

NAME
locale - get locale-specific information SYNOPSIS
locale [-a | -m] locale [-ck] name... DESCRIPTION
The locale utility writes information about the current locale environment, or all public locales, to the standard output. For the purposes of this section, a public locale is one provided by the implementation that is accessible to the application. When locale is invoked without any arguments, it summarizes the current locale environment for each locale category as determined by the settings of the environment variables. When invoked with operands, it writes values that have been assigned to the keywords in the locale categories, as follows: o Specifying a keyword name selects the named keyword and the category containing that keyword. o Specifying a category name selects the named category and all keywords in that category. OPTIONS
The following options are supported: -a Writes information about all available public locales. The available locales include POSIX, representing the POSIX locale. -c Writes the names of selected locale categories. The -c option increases readability when more than one category is selected (for example, via more than one keyword name or via a category name). It is valid both with and without the -k option. -k Writes the names and values of selected keywords. The implementation may omit values for some keywords; see OPERANDS. -m Writes names of available charmaps; see localedef(1). OPERANDS
The following operand is supported: name The name of a locale category, the name of a keyword in a locale category, or the reserved name charmap. The named category or keyword will be selected for output. If a single name represents both a locale category name and a keyword name in the current locale, the results are unspecified; otherwise, both category and keyword names can be specified as name operands, in any sequence. EXAMPLES
Example 1: Examples of the locale utility In the following examples, the assumption is that locale environment variables are set as follows: LANG=locale_x LC_COLLATE=locale_y The command locale would result in the following output: LANG=locale_x LC_CTYPE="locale_x" LC_NUMERIC="locale_x" LC_TIME="locale_x" LC_COLLATE=locale_y LC_MONETARY="locale_x" LC_MESSAGES="locale_x" LC_ALL= The command LC_ALL=POSIX locale -ck decimal_point would produce: LC_NUMERIC decimal_point="." The following command shows an application of locale to determine whether a user-supplied response is affirmative: if printf "%s " "$response" | /usr/xpg4/bin/grep -Eq "$(locale yesexpr)" then affirmative processing goes here else non-affirmative processing goes here fi ENVIRONMENT VARIABLES
See environ(5) for the descriptions of LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. The LANG, LC_*, and NLSPATH environment variables must specify the current locale environment to be written out. These environment vari- ables will be used if the -a option is not specified. EXIT STATUS
The following exit values are returned: 0 All the requested information was found and output successfully. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWloc | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
localedef(1), attributes(5), charmap(5), environ(5), locale(5), standards(5) NOTES
If LC_CTYPE or keywords in the category LC_CTYPE are specified, only the values in the range 0x00-0x7f are written out. If LC_COLLATE or keywords in the category LC_COLLATE are specified, no actual values are written out. SunOS 5.10 20 Dec 1996 locale(1)
Man Page