NAME
CatalystX::I18N::Role::PosixLocale - Sets the POSIX locale
SYNOPSIS
# In your catalyst base class
package MyApp::Catalyst;
use Catalyst qw/MyPlugins
CatalystX::I18N::Role::Base
CatalystX::I18N::Role::PosixLocale/;
sub action : Local {
my ($self,$c) = @_;
$c->locale('sk_SK')
# POSIX LC_COLLATE locale is 'sk_SK.UTF-8' now
}
DESCRIPTION
This role sets the POSIX locales for each request.
METHODS
i18n_posix_category
Helper method that returns the value of the requested POSIX locale category (LC_ALL, LC_COLLATE, LC_NUMERIC, LC_MONETARY). The POSIX category that should be used can be set in the I18N config.
__PACKAGE__->config(
I18N => {
posix_category => 'LC_COLLATE',
}
);
Default is LC_ALL
SEE ALSO
AUTHOR
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
L<http://www.revdev.at>