localeconv() takes no arguments, and returns B<a reference to> a hash.
The keys of this hash are variable names for formatting, such as
C<decimal_point> and C<thousands_sep>. The values are the
-corresponding, er, values. See L<POSIX (3)/localeconv> for a longer
+corresponding, er, values. See L<POSIX/localeconv> for a longer
example listing the categories an implementation might be expected to
provide; some provide more and others fewer. You don't need an
explicit C<use locale>, because localeconv() always observes the
}
print "\n";
+=head2 I18N::Langinfo
+
+Another interface for querying locale-dependent information is the
+I18N::Langinfo::langinfo() function, available at least in UNIX-like
+systems and VMS.
+
+The following example will import the langinfo() function itself and
+three constants to be used as arguments to langinfo(): a constant for
+the abbreviated first day of the week (the numbering starts from
+Sunday = 1) and two more constants for the affirmative and negative
+answers for a yes/no question in the current locale.
+
+ use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR);
+
+ my ($abday_1, $yesstr, $nostr) = map { langinfo } qw(ABDAY_1 YESSTR NOSTR);
+
+ print "$abday_1? [$yesstr/$nostr] ";
+
+In other words, in the "C" (or English) locale the above will probably
+print something like:
+
+ Sun? [yes/no]
+
+See L<I18N::Langinfo> for more information.
+
=head1 LOCALE CATEGORIES
The following subsections describe basic locale categories. Beyond these,
print "DECIMAL POINT IS COMMA\n"
if $n == (strtod("2,5"))[0]; # Locale-dependent conversion
+See also L<I18N::Langinfo> and C<RADIXCHAR>.
+
=head2 Category LC_MONETARY: Formatting of monetary amounts
The C standard defines the C<LC_MONETARY> category, but no function
does not quite meet your requirements: currency formatting is a hard nut
to crack.
+See also L<I18N::Langinfo> and C<CRNCYSTR>.
+
=head2 LC_TIME
Output produced by POSIX::strftime(), which builds a formatted
exists only to generate locale-dependent results, strftime() always
obeys the current C<LC_TIME> locale.
+See also L<I18N::Langinfo> and C<ABDAY_1>..C<ABDAY_7>, C<DAY_1>..C<DAY_7>,
+C<ABMON_1>..C<ABMON_12>, and C<ABMON_1>..C<ABMON_12>.
+
=head2 Other categories
The remaining locale category, C<LC_MESSAGES> (possibly supplemented
=head1 SEE ALSO
-L<POSIX (3)/isalnum>, L<POSIX (3)/isalpha>, L<POSIX (3)/isdigit>,
-L<POSIX (3)/isgraph>, L<POSIX (3)/islower>, L<POSIX (3)/isprint>,
-L<POSIX (3)/ispunct>, L<POSIX (3)/isspace>, L<POSIX (3)/isupper>,
-L<POSIX (3)/isxdigit>, L<POSIX (3)/localeconv>, L<POSIX (3)/setlocale>,
-L<POSIX (3)/strcoll>, L<POSIX (3)/strftime>, L<POSIX (3)/strtod>,
-L<POSIX (3)/strxfrm>.
+L<I18N::Langinfo>, L<POSIX/isalnum>, L<POSIX/isalpha>,
+L<POSIX/isdigit>, L<POSIX/isgraph>, L<POSIX/islower>,
+L<POSIX/isprint>, L<POSIX/ispunct>, L<POSIX/isspace>,
+L<POSIX/isupper>, L<POSIX/isxdigit>, L<POSIX/localeconv>,
+L<POSIX/setlocale>, L<POSIX/strcoll>, L<POSIX/strftime>,
+L<POSIX/strtod>, L<POSIX/strxfrm>.
=head1 HISTORY