2014-03-09 09:14:03 +00:00
|
|
|
.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
|
|
|
|
.\"
|
|
|
|
.\" %%%LICENSE_START(VERBATIM)
|
|
|
|
.\" Permission is granted to make and distribute verbatim copies of this
|
|
|
|
.\" manual provided the copyright notice and this permission notice are
|
|
|
|
.\" preserved on all copies.
|
|
|
|
.\"
|
|
|
|
.\" Permission is granted to copy and distribute modified versions of this
|
|
|
|
.\" manual under the conditions for verbatim copying, provided that the
|
|
|
|
.\" entire resulting derived work is distributed under the terms of a
|
|
|
|
.\" permission notice identical to this one.
|
|
|
|
.\"
|
|
|
|
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
|
|
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
|
|
.\" responsibility for errors or omissions, or for damages resulting from
|
|
|
|
.\" the use of the information contained herein. The author(s) may not
|
|
|
|
.\" have taken the same level of care in the production of this manual,
|
|
|
|
.\" which is licensed free of charge, as they might when working
|
|
|
|
.\" professionally.
|
|
|
|
.\"
|
|
|
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
|
|
.\" the source, must acknowledge the copyright and authors of this work.
|
|
|
|
.\" %%%LICENSE_END
|
|
|
|
.\"
|
intro.1, locale.1, _exit.2, access.2, bpf.2, brk.2, capget.2, chmod.2, chroot.2, clock_getres.2, clone.2, eventfd.2, fallocate.2, fork.2, getgroups.2, gethostname.2, getpid.2, getpriority.2, getrlimit.2, getrusage.2, gettid.2, iopl.2, ioprio_set.2, killpg.2, mlock.2, mprotect.2, perf_event_open.2, poll.2, posix_fadvise.2, pread.2, ptrace.2, read.2, readv.2, recv.2, rename.2, sched_setaffinity.2, sched_setattr.2, seccomp.2, select.2, send.2, seteuid.2, setgid.2, setresuid.2, setreuid.2, setuid.2, sigaltstack.2, signalfd.2, sigpending.2, sigprocmask.2, sigreturn.2, sigsuspend.2, sigwaitinfo.2, socket.2, stat.2, timer_create.2, uname.2, utimensat.2, wait.2, wait4.2, write.2, MB_LEN_MAX.3, __ppc_get_timebase.3, clearenv.3, dl_iterate_phdr.3, error.3, fexecve.3, fpurge.3, fread.3, fts.3, getaddrinfo.3, getaddrinfo_a.3, getauxval.3, getgrent_r.3, gethostbyname.3, getifaddrs.3, getnameinfo.3, getnetent_r.3, getprotoent.3, getprotoent_r.3, getpw.3, getpwent_r.3, getrpcent.3, getrpcent_r.3, getrpcport.3, getservent.3, getservent_r.3, gsignal.3, key_setsecret.3, malloc_get_state.3, malloc_info.3, malloc_stats.3, malloc_trim.3, memcpy.3, mq_notify.3, mq_open.3, perror.3, profil.3, psignal.3, pthread_attr_init.3, pthread_attr_setaffinity_np.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_create.3, pthread_detach.3, pthread_getattr_np.3, pthread_join.3, pthread_setname_np.3, pthread_tryjoin_np.3, putgrent.3, rcmd.3, rpc.3, rpmatch.3, sem_close.3, sem_open.3, setaliasent.3, shm_open.3, sigqueue.3, strfmon.3, xcrypt.3, xdr.3, console_codes.4, null.4, core.5, host.conf.5, hosts.equiv.5, locale.5, repertoiremap.5, locale.7, man-pages.7, pty.7, rtld-audit.7, sched.7, vdso.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2015-07-23 14:12:28 +00:00
|
|
|
.TH LOCALE 1 2015-07-23 "Linux" "Linux User Manual"
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH NAME
|
|
|
|
locale \- get locale-specific information
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.nf
|
2014-08-30 13:48:26 +00:00
|
|
|
.BR locale " [\fIoption\fP]"
|
|
|
|
.BR locale " [\fIoption\fP] \-a"
|
|
|
|
.BR locale " [\fIoption\fP] \-m"
|
|
|
|
.BR locale " [\fIoption\fP] \fIname\fP..."
|
2014-03-09 09:14:03 +00:00
|
|
|
.fi
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.B locale
|
|
|
|
command displays information about the current locale, or all locales,
|
|
|
|
on standard output.
|
|
|
|
|
|
|
|
When invoked without arguments,
|
|
|
|
.B locale
|
|
|
|
displays the current locale settings for each locale category (see
|
|
|
|
.BR locale (5)),
|
|
|
|
based on the settings of the environment variables that control the locale
|
|
|
|
(see
|
|
|
|
.BR locale (7)).
|
2015-07-23 14:15:22 +00:00
|
|
|
Values for variables set in the environment are printed without double
|
2015-06-12 13:31:53 +00:00
|
|
|
quotes, implied values are printed with double quotes.
|
2014-03-09 09:14:03 +00:00
|
|
|
|
|
|
|
If either the
|
|
|
|
.B \-a
|
|
|
|
or the
|
|
|
|
.B \-m
|
|
|
|
option (or one of their long-format equivalents) is specified,
|
|
|
|
the behavior is as follows:
|
|
|
|
.TP
|
|
|
|
.BR \-a ", " \-\-all\-locales
|
|
|
|
Display a list of all available locales.
|
|
|
|
The
|
|
|
|
.B -v
|
|
|
|
option causes the
|
|
|
|
.B LC_IDENTIFICATION
|
|
|
|
metadata about each locale to be included in the output.
|
|
|
|
.TP
|
|
|
|
.BR \-m ", " \-\-charmaps
|
|
|
|
Display the available charmaps (character set description files).
|
2016-01-18 11:07:33 +00:00
|
|
|
To display the current character set for the locale, use
|
|
|
|
\fBlocale -c charmap\fR.
|
2014-03-09 09:14:03 +00:00
|
|
|
.PP
|
|
|
|
The
|
2015-01-26 16:21:17 +00:00
|
|
|
.B locale
|
2014-03-09 09:14:03 +00:00
|
|
|
command can also be provided with one or more arguments,
|
|
|
|
which are the names of locale keywords (for example,
|
|
|
|
.IR date_fmt ,
|
|
|
|
.IR ctype-class-names ,
|
|
|
|
.IR yesexpr ,
|
|
|
|
or
|
|
|
|
.IR decimal_point )
|
|
|
|
or locale categories (for example,
|
|
|
|
.BR LC_CTYPE
|
|
|
|
or
|
|
|
|
.BR LC_TIME ).
|
|
|
|
For each argument, the following is displayed:
|
|
|
|
.IP * 3
|
|
|
|
For a locale keyword, the value of that keyword to be displayed.
|
|
|
|
.IP *
|
|
|
|
For a locale category,
|
|
|
|
the values of all keywords in that category are displayed.
|
|
|
|
.PP
|
|
|
|
When arguments are supplied, the following options are meaningful:
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-c ", " \-\-category\-name
|
2014-03-09 09:14:03 +00:00
|
|
|
For a category name argument,
|
|
|
|
write the name of the locale category
|
|
|
|
on a separate line preceding the list of keyword values for that category.
|
|
|
|
|
|
|
|
For a keyword name argument,
|
|
|
|
write the name of the locale category for this keyword
|
|
|
|
on a separate line preceding the keyword value.
|
|
|
|
|
|
|
|
This option improves readability when multiple name arguments are specified.
|
|
|
|
It can be combined with the
|
|
|
|
.B \-k
|
|
|
|
option.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-k ", " \-\-keyword\-name
|
2014-03-09 09:14:03 +00:00
|
|
|
For each keyword whose value is being displayed,
|
|
|
|
include also the name of that keyword,
|
|
|
|
so that the output has the format:
|
|
|
|
|
|
|
|
\fIkeyword\fP="\fIvalue\fP"
|
|
|
|
.PP
|
|
|
|
The
|
2015-01-26 16:21:17 +00:00
|
|
|
.B locale
|
2014-03-09 09:14:03 +00:00
|
|
|
command also knows about the following options:
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-v ", " \-\-verbose
|
2014-03-09 09:14:03 +00:00
|
|
|
Display additional information for some command-line option and argument
|
|
|
|
combinations.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-? ", " \-\-help
|
2014-03-09 09:14:03 +00:00
|
|
|
Display a summary of command-line options and arguments and exit.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-\-usage
|
2014-03-09 09:14:03 +00:00
|
|
|
Display a short usage message and exit.
|
|
|
|
.TP
|
2014-03-11 11:33:43 +00:00
|
|
|
.BR \-V ", " \-\-version
|
2014-03-09 09:14:03 +00:00
|
|
|
Display the program version and exit.
|
2014-06-02 13:38:20 +00:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
.I /usr/lib/locale/locale-archive
|
|
|
|
Usual default locale archive location.
|
|
|
|
.TP
|
|
|
|
.I /usr/share/i18n/locales
|
|
|
|
Usual default path for locale definition files.
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH CONFORMING TO
|
2014-06-02 13:38:20 +00:00
|
|
|
POSIX.1-2001, POSIX.1-2008.
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH EXAMPLE
|
|
|
|
.nf
|
|
|
|
$ \fBlocale\fP
|
|
|
|
LANG=en_US.UTF\-8
|
|
|
|
LC_CTYPE="en_US.UTF\-8"
|
|
|
|
LC_NUMERIC="en_US.UTF\-8"
|
|
|
|
LC_TIME="en_US.UTF\-8"
|
|
|
|
LC_COLLATE="en_US.UTF\-8"
|
|
|
|
LC_MONETARY="en_US.UTF\-8"
|
|
|
|
LC_MESSAGES="en_US.UTF\-8"
|
|
|
|
LC_PAPER="en_US.UTF\-8"
|
|
|
|
LC_NAME="en_US.UTF\-8"
|
|
|
|
LC_ADDRESS="en_US.UTF\-8"
|
|
|
|
LC_TELEPHONE="en_US.UTF\-8"
|
|
|
|
LC_MEASUREMENT="en_US.UTF\-8"
|
|
|
|
LC_IDENTIFICATION="en_US.UTF\-8"
|
2014-03-11 11:33:43 +00:00
|
|
|
LC_ALL=
|
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale date_fmt\fP
|
|
|
|
%a %b %e %H:%M:%S %Z %Y
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale \-k date_fmt\fP
|
|
|
|
date_fmt="%a %b %e %H:%M:%S %Z %Y"
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-03-09 09:14:03 +00:00
|
|
|
$ \fBlocale \-ck date_fmt\fP
|
|
|
|
LC_TIME
|
|
|
|
date_fmt="%a %b %e %H:%M:%S %Z %Y"
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-05-26 14:24:32 +00:00
|
|
|
$ \fBlocale LC_TELEPHONE\fP
|
|
|
|
+%c (%a) %l
|
|
|
|
(%a) %l
|
|
|
|
11
|
|
|
|
1
|
2014-03-09 09:14:03 +00:00
|
|
|
UTF\-8
|
2014-03-11 11:33:43 +00:00
|
|
|
|
2014-05-26 14:24:32 +00:00
|
|
|
$ \fBlocale \-k LC_TELEPHONE\fP
|
|
|
|
tel_int_fmt="+%c (%a) %l"
|
|
|
|
tel_dom_fmt="(%a) %l"
|
|
|
|
int_select="11"
|
|
|
|
int_prefix="1"
|
|
|
|
telephone\-codeset="UTF\-8"
|
2014-03-09 09:14:03 +00:00
|
|
|
.fi
|
2014-05-26 08:28:34 +00:00
|
|
|
|
|
|
|
The following example compiles a custom locale from the
|
|
|
|
.I ./wrk
|
|
|
|
directory with the
|
|
|
|
.BR localedef (1)
|
|
|
|
utility under the
|
|
|
|
.I $HOME/.locale
|
|
|
|
directory, then tests the result with the
|
|
|
|
.BR date (1)
|
|
|
|
command, and then sets the environment variables
|
|
|
|
.B LOCPATH
|
|
|
|
and
|
|
|
|
.B LANG
|
|
|
|
in the shell profile file so that the custom locale will be used in the
|
|
|
|
subsequent user sessions:
|
|
|
|
|
|
|
|
.nf
|
|
|
|
$ \fBmkdir -p $HOME/.locale\fP
|
|
|
|
$ \fBI18NPATH=./wrk/ localedef -f UTF-8 -i fi_SE $HOME/.locale/fi_SE.UTF-8\fP
|
|
|
|
$ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date\fP
|
|
|
|
$ \fBecho "export LOCPATH=\\$HOME/.locale" >> $HOME/.bashrc\fP
|
|
|
|
$ \fBecho "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc\fP
|
|
|
|
.fi
|
2014-03-09 09:14:03 +00:00
|
|
|
.SH SEE ALSO
|
2014-05-26 08:28:34 +00:00
|
|
|
.BR localedef (1),
|
2014-06-02 13:38:20 +00:00
|
|
|
.BR charmap (5),
|
2014-03-09 09:14:03 +00:00
|
|
|
.BR locale (5),
|
|
|
|
.BR locale (7)
|