setlocale#
Query or change the program’s locale setting.
Σύνοψη#
use POSIX qw(setlocale LC_ALL LC_NUMERIC);
setlocale(LC_ALL, ""); # honour environment
my $cur = setlocale(LC_NUMERIC); # query current
Τι επιστρέφεται#
The resulting locale name as a string, or undef if the category/locale combination is invalid. Calling with one argument queries; calling with two sets. Passing "" as the new locale asks libc to pick from LC_* / LANG environment variables.
Οριακές περιπτώσεις#
Changing a category can affect formatting of numbers, collation, date strings, and error messages throughout the process.
Διαφορές από το upstream#
Fully compatible with upstream POSIX.
Δείτε επίσης#
localeconv- inspect the active locale’s numeric and monetary conventions.