CatalystX::I18N::TraitFor::ViewTT - Adds I18N filters and VMethods to a TT view
# In your view package MyApp::View::TT; use Moose; extends qw(Catalyst::View::TT); with qw(CatalystX::I18N::TraitFor::ViewTT); # In your TT template # Localised number format [% 22 | number('number') %] [% 22 | number %] # Localised collation [% mylist.lsort().join(', ') %] # Maketext [% 'Hello %1!' | maketext(name) %]
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 (default)
bytes
negative
picture
Returns the translation for the given string.
You need to have the CatalystX::I18N::Role::Maketext role loaded in Catalyst.
You need to have the CatalystX::I18N::Role::DataLocalize role loaded in Catalyst.
Locale aware collation. You need to have the CatalystX::I18N::Role::Collate role loaded in Catalyst.
CatalystX::I18N::Role::NumberFormat, CatalystX::I18N::Role::Collate, CatalystX::I18N::Role::Maketext, CatalystX::I18N::Role::DataLocalize and Catalyst::View::TT
Maroš Kollár CPAN ID: MAROS maros [at] k-1.com L<http://www.k-1.com>
To install CatalystX::I18N, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CatalystX::I18N
CPAN shell
perl -MCPAN -e shell install CatalystX::I18N
For more information on module installation, please visit the detailed CPAN module installation guide.