X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperllocale.pod;h=7864addc3e8f431ac27d4aceb94310dd9fa372aa;hb=3d555cb8c04bfcf8315c3f7c616b505041697522;hp=d37664c5ab3c87389bdce2120e0a352c137bd9cf;hpb=551e1d922a333f90a45a26904eb4d9882f7bd5d4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perllocale.pod b/pod/perllocale.pod index d37664c..7864add 100644 --- a/pod/perllocale.pod +++ b/pod/perllocale.pod @@ -381,7 +381,7 @@ with a single parameter--see L.) localeconv() takes no arguments, and returns B a hash. The keys of this hash are variable names for formatting, such as C and C. The values are the -corresponding, er, values. See L for a longer +corresponding, er, values. See L 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, because localeconv() always observes the @@ -427,6 +427,31 @@ parameters as integers correctly formatted in the current locale: } 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 for more information. + =head1 LOCALE CATEGORIES The following subsections describe basic locale categories. Beyond these, @@ -574,6 +599,8 @@ string formats: print "DECIMAL POINT IS COMMA\n" if $n == (strtod("2,5"))[0]; # Locale-dependent conversion +See also L and C. + =head2 Category LC_MONETARY: Formatting of monetary amounts The C standard defines the C category, but no function @@ -587,6 +614,8 @@ find that the information, voluminous and complex though it may be, still does not quite meet your requirements: currency formatting is a hard nut to crack. +See also L and C. + =head2 LC_TIME Output produced by POSIX::strftime(), which builds a formatted @@ -606,6 +635,9 @@ Note: C isn't needed in this example: as a function that exists only to generate locale-dependent results, strftime() always obeys the current C locale. +See also L and C..C, C..C, +C..C, and C..C. + =head2 Other categories The remaining locale category, C (possibly supplemented @@ -964,12 +996,12 @@ operating system upgrade. =head1 SEE ALSO -L, L, L, -L, L, L, -L, L, L, -L, L, L, -L, L, L, -L. +L, L, L, +L, L, L, +L, L, L, +L, L, L, +L, L, L, +L, L. =head1 HISTORY