NAME
CatalystX::I18N::TraitFor::ViewTT - Adds I18N filters and vmethods to a TT view
SYNOPSIS
# In your view
package MyApp::View::TT;
use Moose;
extends qw(Catalyst::View::TT);
with qw(CatalystX::I18N::TraitFor::ViewTT);
# In your TT template
# Localized number format
[% 22 | number('number') %]
# Localized collation
[% mylist.lsort().join(', ') %]
# Maketext
[% 'Hello %1!' | maketext(name) %]
DESCRIPTION
Filters
number
Formats a number with the current locale settings. You need to have the CatalystX::I18N::Role::NumberFormat role loaded in Catalyst.
The following formats are available
price
number
bytes
negative
picture
maketext
Returns the translation for the given string.
You need to have the CatalystX::I18N::Role::Maketext role loaded in Catalyst.
VMethods
lsort
Locale aware collation. You need to have the CatalystX::I18N::Role::Collate role loaded in Catalyst.
SEE ALSO
CatalystX::I18N::Role::NumberFormat, CatalystX::I18N::Role::Collate, CatalystX::I18N::Role::Maketext and Catalyst::View::TT
AUTHOR
Maroš Kollár
CPAN ID: MAROS
maros [at] k-1.com
L<http://www.revdev.at>