summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-05-26 01:00:22 +0000
committerKevin Ryde <user42@zip.com.au>2003-05-26 01:00:22 +0000
commit74f76d628f70962749153b39ee2be82923fc726c (patch)
tree6f14351535a3dff45521e8b5dcbeaa466deb1e40
parentddd8f927d870b231431867fb8e24a08ed069c188 (diff)
downloadguile-74f76d628f70962749153b39ee2be82923fc726c.tar.gz
(Locales): Clarify setlocale a bit, list all categories,
cross reference to libc.
-rw-r--r--doc/ref/posix.texi38
1 files changed, 22 insertions, 16 deletions
diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index c0bdc20e1..8e78717cd 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -2660,22 +2660,28 @@ no other easy or unambiguous way of detecting such features.
@deffn {Scheme Procedure} setlocale category [locale]
@deffnx {C Function} scm_setlocale (category, locale)
-@vindex LC_ALL
-@vindex LC_COLLATE
-@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
-@var{locale} and the new value is returned as a
-system-dependent string. If @var{locale} is an empty string,
-the locale will be set using environment variables.
+Get or set the current locale, used for various internationalizations.
+Locales are strings, such as @samp{sv_SE}.
+
+If @var{locale} is given then the locale for the given category is set
+and the new value returned. If @var{locale} is not given then the
+current value is returned. @var{category} should be one of the
+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
@node Encryption