mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
(Locales): Clarify setlocale a bit, list all categories,
cross reference to libc.
This commit is contained in:
parent
ddd8f927d8
commit
74f76d628f
1 changed files with 21 additions and 15 deletions
|
@ -2660,22 +2660,28 @@ no other easy or unambiguous way of detecting such features.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} setlocale category [locale]
|
@deffn {Scheme Procedure} setlocale category [locale]
|
||||||
@deffnx {C Function} scm_setlocale (category, locale)
|
@deffnx {C Function} scm_setlocale (category, locale)
|
||||||
@vindex LC_ALL
|
Get or set the current locale, used for various internationalizations.
|
||||||
@vindex LC_COLLATE
|
Locales are strings, such as @samp{sv_SE}.
|
||||||
@vindex LC_CTYPE
|
|
||||||
@vindex LC_MESSAGES
|
|
||||||
@vindex LC_MONETARY
|
|
||||||
@vindex LC_NUMERIC
|
|
||||||
@vindex LC_TIME
|
|
||||||
If @var{locale} is omitted, return the current value of the specified
|
|
||||||
locale @var{category} as a system-dependent string. @var{category}
|
|
||||||
should be specified using the values @code{LC_COLLATE}, @code{LC_ALL}
|
|
||||||
etc; see @inforef{Locating Catalogs,, gettext}.
|
|
||||||
|
|
||||||
Otherwise the specified locale category is set to the string
|
If @var{locale} is given then the locale for the given category is set
|
||||||
@var{locale} and the new value is returned as a
|
and the new value returned. If @var{locale} is not given then the
|
||||||
system-dependent string. If @var{locale} is an empty string,
|
current value is returned. @var{category} should be one of the
|
||||||
the locale will be set using environment variables.
|
following values
|
||||||
|
|
||||||
|
@defvar LC_ALL
|
||||||
|
@defvarx LC_COLLATE
|
||||||
|
@defvarx LC_CTYPE
|
||||||
|
@defvarx LC_MESSAGES
|
||||||
|
@defvarx LC_MONETARY
|
||||||
|
@defvarx LC_NUMERIC
|
||||||
|
@defvarx LC_TIME
|
||||||
|
@end defvar
|
||||||
|
|
||||||
|
A common usage is @samp{(setlocale LC_ALL "")}, which initializes all
|
||||||
|
categories based on standard environment variables (@code{LANG} etc).
|
||||||
|
For full details on categories and locale names @pxref{Locales,,
|
||||||
|
Locales and Internationalization, libc, The GNU C Library Reference
|
||||||
|
Manual}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@node Encryption
|
@node Encryption
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue