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
|
|
|
|
.\"
|
locale.1, localedef.1, _exit.2, accept.2, access.2, acct.2, adjtimex.2, bdflush.2, bind.2, bpf.2, brk.2, chdir.2, chmod.2, chown.2, chroot.2, clock_nanosleep.2, clone.2, close.2, connect.2, copy_file_range.2, create_module.2, delete_module.2, dup.2, epoll_ctl.2, eventfd.2, execve.2, fallocate.2, fanotify_init.2, fcntl.2, flock.2, fork.2, fsync.2, futex.2, get_kernel_syms.2, getdomainname.2, getgroups.2, gethostname.2, getpagesize.2, getpeername.2, getsid.2, getsockname.2, getsockopt.2, gettimeofday.2, init_module.2, ioctl.2, ioctl_list.2, ioperm.2, iopl.2, kexec_load.2, kill.2, killpg.2, link.2, listen.2, llseek.2, lseek.2, madvise.2, memfd_create.2, mincore.2, mkdir.2, mknod.2, mmap.2, mount.2, nanosleep.2, nice.2, open.2, personality.2, pipe.2, poll.2, posix_fadvise.2, read.2, readahead.2, readlink.2, readv.2, recv.2, recvmmsg.2, rename.2, request_key.2, sched_setaffinity.2, sched_setattr.2, select.2, select_tut.2, semctl.2, semop.2, send.2, sendfile.2, sendmmsg.2, seteuid.2, setns.2, setpgid.2, setreuid.2, shutdown.2, sigaction.2, sigaltstack.2, signal.2, signalfd.2, sigpending.2, sigprocmask.2, sigsuspend.2, socketpair.2, splice.2, stat.2, statfs.2, stime.2, symlink.2, sync.2, syscall.2, syscalls.2, times.2, truncate.2, unlink.2, unshare.2, uselib.2, utimensat.2, vfork.2, vhangup.2, wait.2, wait4.2, write.2, a64l.3, abs.3, acos.3, acosh.3, addseverity.3, adjtime.3, aio_read.3, aio_write.3, asin.3, asinh.3, atan.3, atan2.3, atanh.3, atoi.3, backtrace.3, cbrt.3, ceil.3, cfree.3, clearenv.3, clock_getcpuclockid.3, clog10.3, cmsg.3, copysign.3, cos.3, cosh.3, ctermid.3, ctime.3, daemon.3, dirfd.3, div.3, dl_iterate_phdr.3, drand48.3, drand48_r.3, dysize.3, ecvt.3, ecvt_r.3, endian.3, erf.3, erfc.3, errno.3, exec.3, exp.3, exp2.3, expm1.3, fabs.3, fdim.3, ferror.3, fexecve.3, ffs.3, fgetgrent.3, fgetpwent.3, finite.3, flockfile.3, floor.3, fma.3, fmax.3, fmin.3, fmod.3, fopen.3, fpclassify.3, frexp.3, fseeko.3, fts.3, futimes.3, fwide.3, gamma.3, gcvt.3, getaddrinfo.3, getcwd.3, getdate.3, getdirentries.3, getdtablesize.3, getgrent.3, getgrent_r.3, getgrnam.3, getgrouplist.3, gethostbyname.3, gethostid.3, getline.3, getloadavg.3, getmntent.3, getnameinfo.3, getnetent_r.3, getpass.3, getprotoent_r.3, getpwent.3, getpwent_r.3, getpwnam.3, getrpcent_r.3, getservent_r.3, getspnam.3, getsubopt.3, getusershell.3, getutent.3, getw.3, gsignal.3, hypot.3, ilogb.3, inet.3, initgroups.3, insque.3, isalpha.3, isgreater.3, iswblank.3, j0.3, ldexp.3, lgamma.3, lio_listio.3, lockf.3, log.3, log10.3, log1p.3, log2.3, logb.3, lrint.3, lround.3, makedev.3, matherr.3, mbsnrtowcs.3, mkdtemp.3, mkfifo.3, mkstemp.3, mktemp.3, modf.3, mq_close.3, mq_getattr.3, mq_notify.3, mq_receive.3, mq_send.3, nan.3, nextafter.3, on_exit.3, open_memstream.3, opendir.3, perror.3, popen.3, posix_fallocate.3, posix_madvise.3, posix_memalign.3, posix_openpt.3, posix_spawn.3, pow.3, printf.3, profil.3, psignal.3, pthread_attr_setstack.3, pthread_setaffinity_np.3, putenv.3, putpwent.3, qecvt.3, rand.3, random.3, random_r.3, rcmd.3, readdir.3, realpath.3, remainder.3, remquo.3, rexec.3, rint.3, round.3, rpc.3, rpmatch.3, scalb.3, scalbln.3, scandir.3, scanf.3, seekdir.3, sem_wait.3, setbuf.3, setenv.3, setjmp.3, setnetgrent.3, siginterrupt.3, signbit.3, significand.3, sigset.3, sigsetops.3, sigvec.3, sigwait.3, sin.3, sinh.3, sleep.3, sockatmark.3, sqrt.3, statvfs.3, stpcpy.3, stpncpy.3, strdup.3, strerror.3, strftime.3, strlen.3, strnlen.3, strsep.3, strsignal.3, strtod.3, strtok.3, strtol.3, strtoul.3, syslog.3, system.3, tan.3, tanh.3, telldir.3, tempnam.3, termios.3, tgamma.3, timegm.3, timeradd.3, tmpfile.3, tmpnam.3, toascii.3, trunc.3, ttyslot.3, tzset.3, ualarm.3, unlocked_stdio.3, usleep.3, wcpcpy.3, wcpncpy.3, wcscasecmp.3, wcsdup.3, wcsncasecmp.3, wcsnlen.3, wcsnrtombs.3, wprintf.3, y0.3, pts.4, st.4, tty_ioctl.4, elf.5, gai.conf.5, group.5, locale.5, nsswitch.conf.5, proc.5, utmp.5, aio.7, capabilities.7, credentials.7, environ.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, mq_overview.7, namespaces.7, pipe.7, signal.7, socket.7, standards.7, svipc.7, symlink.7, time.7, unicode.7, unix.7: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2016-03-15 03:46:01 +00:00
|
|
|
.TH LOCALE 1 2016-03-15 "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]"
|
2016-07-07 11:10:05 +00:00
|
|
|
.BR locale " [\fIoption\fP] " \-a
|
|
|
|
.BR locale " [\fIoption\fP] " \-m
|
2014-08-30 13:48:26 +00:00
|
|
|
.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)
|