Maroš Kollár > CatalystX-I18N > CatalystX::I18N::TraitFor::ViewTT

Download:
CatalystX-I18N-1.13.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

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
 # Localised number format
 [% 22 | number('number') %]
 [% 22 | number %]
 
 # Localised 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

maketext

Returns the translation for the given string.

You need to have the CatalystX::I18N::Role::Maketext role loaded in Catalyst.

localize

Returns the translation for the given string.

You need to have the CatalystX::I18N::Role::DataLocalize 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, CatalystX::I18N::Role::DataLocalize and Catalyst::View::TT

AUTHOR ^

    Maroš Kollár
    CPAN ID: MAROS
    maros [at] k-1.com
    
    L<http://www.k-1.com>
syntax highlighting: