abbreviated as B<i18n>); telling such an application about a particular
set of preferences is known as B<localization> (B<l10n>).
-Perl was extended, starting in 5.004, to support the locale system. This
+Perl was extended to support the locale system. This
is controlled per application by using one pragma, one function call,
and several environment variables.
You can switch locales as often as you wish at run time with the
POSIX::setlocale() function:
- # This functionality not usable prior to Perl 5.004
- require 5.004;
-
# Import locale-handling tool set from POSIX module.
# This example uses: setlocale -- the function call
# LC_CTYPE -- explained below
Here's a simple-minded example program that rewrites its command-line
parameters as integers correctly formatted in the current locale:
- # See comments in previous example
- require 5.004;
use POSIX qw(locale_h);
# Get some of locale's numeric formatting parameters