Hi,
I can't seem to get locales "working", and I have to wonder whether I'm
doing something wrong or whether POSIX locales just aren't supported in
the default OS install. Here's my test script:
-------------------------------------
#!/usr/bin/perl
use strict;
use locale;
use POSIX qw(locale_h);
my $cur_locale = setlocale(LC_ALL);
printf "($cur_locale) %f\n", 5/2;
$cur_locale = setlocale(LC_ALL, "fr_CA.ISO8859-1") or warn $!;
printf "($cur_locale) %f\n", 5/2;
$cur_locale = setlocale(LC_ALL, "sp") or warn $!;
printf "($cur_locale) %f\n", 5/2;
-----------output--------------------
(C) 2.500000
No such file or directory at locale.pl line 10.
() 2.500000
No such file or directory at locale.pl line 13.
() 2.500000
-------------------------------------
So, I looked in /usr/share/locale/ and saw a bunch of directories with
two-letter language names, but in those directories there are just a
handful of LC_MESSAGES message catalogs. Am I simply using the wrong
locale names, or barking up the wrong tree altogether? Do I have to
download locale definitions myself?
-Ken