Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
locale(1)		    General Commands Manual		     locale(1)

       locale -	get locale-specific (NLS) information

       name ...

       The  command  displays  information  about  the current locale or about
       available locales.

       When invoked without arguments, displays	the name and actual or implied
       value  of each of the locale-related environment	variables in the order
       shown below, one	per line:

       An actual value is the value the	variable actually has  in  the	user's
       environment.   An  implied  value  is derived from the value of another
       variable.  Implied values are  displayed	 enclosed  in  double  quotes,
       while actual values are unquoted.

       The  determination of implied values is that if the variable is present
       and has a non-null value, that is the actual value for and all  of  the
       other variables take its	value as an implied value.  If is not set, all
       of the variables	that are set are shown with their value	as  an	actual
       value.  Any that	have no	value are shown	with the value of the environ-
       ment variable as	their implied value.  is displayed as  if  it  has  no

       The  command  can take multiple arguments, which	may be locale category
       names, locale keywords, or the special word (see	 localedef(1M)	for  a
       description of locale keywords and charmaps).  If an argument is	a key-
       word, the value associated with that keyword in the current environment
       is  displayed and possibly other	information, depending on selected op-
       tions.  If an argument is a category name (i.e.,	the values of all key-
       words  defined  in  that	category are displayed.	 If an argument	is the
       special word the	charmap	file (if any) that was used in the  definition
       of the current locale is	displayed.

       Non-printable characters	are printed as hexadecimal values in the form,

       except  that  if	 a different escape character has been defined for the
       locale, it is displayed instead of the "\".

       The following options are available:

	      List all available locales.
			These are the possible meaningful values that  can  be
			assigned  to  or  any  of the variables	on the system.
			They are dependent upon	which locales  have  been  in-
			stalled	on the system.	By default on a	PA system, the
			locales	in are listed.	By default on an  IPF  system,
			the  locales in	are listed.  This option takes 32 (for
			ILP32, 32-bit int, long, pointer, 32-bit offset) or 64
			(for LP64, 64-bit long,	pointer, 64-bit	offset)	as its

			Display	32-bit locales for PA and IPF systems.

			Display	32-bit locales for PA and IPF systems.

			Display	only 64-bit locales on 64-bit systems.
				  If executed on a  32-bit  system,  an	 error
				  message is returned.

	      List  IPF	 32-bit	locales, IPF 64-bit locales, PA	32-bit locales
			PA 64-bit locales available on the system.

	      Display a	list of	available charmap files	on the system.
			See localedef(1M) for a	definition  of	charmap	 files
			and their usage.

	      Display names of locale categories that have been	selected
			either	explicitly  or	by  giving a keyword contained
			therein.  This option may be used with the option.

	      Display names of keywords	that have been selected
			either explicitly or  by  providing  their  containing
			category as an argument.  Keyword names	and values are
			displayed as:


			Without	the option, only  the  values  are  displayed.
			This option can	be used	with the option.

	      Display  32-bit  PA  locales. (Option available only on IPF sys-

	      Display 64-bit PA	locales. (Option available only	 on  IPF  sys-

	      name	Specify	 the  locale category name, locale keyword, or
			the special word

   Environment Variables
       provides	a default value	for the	 internationalization  variables  that
       are  unset  or null. If is unset	or null, the default value of "C" (see
       lang(5))	is used.  If any of the	 internationalization  variables  con-
       tains  an  invalid  setting, will behave	as if all internationalization
       variables are set to "C".  See environ(5).

       when set	to a non-empty string value, overrides the values of all other
       internationalization variables.

       determines the interpretation of	text as	single and/or multi-byte char-
       acters, the classification of characters	as printable, and the  charac-
       ters matched by character class expressions in regular expressions.

       determines the locale that should be used to affect the format and con-
       tent of diagnostic messages written to standard error, and  informative
       messages	written	to standard output.

       determines the location of message catalog for the processing of

   International Code Set Support
       Single- and multi-byte character	code sets are supported.

       The command exits with one of the following values:

	      All requested information	was found and displayed	successfully.

	      An  error	 occurred in either finding or displaying the informa-

       If the locale environment variables are set as:

       the command:

       gives the following output:

       The command:


       If is set to and	no other locale	variables are set, the command:


       which correspond	to the keywords	decimal_point,	thousands_sep,	group-
       ing, and	alt_digit.

       localedef(1M),	 localeconv(3C),    nl_langinfo(3C),	setlocale(3C),
       charmap(4), localedef(4), environ(5), lang(5).



Want to link to this manual page? Use this URL:

home | help