Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $loc = Data::Localizer->new;
- $loc->add_localizer(
- Data::Localize::Gettext->new(
- formatter => Data::Localze::Format::Gettext->new(
- functions => {
- foo => sub {
- # do something and return localized text
- return ...;
- },
- bar => sub {
- ...
- }
- }
- )
- )
- );
- [% loc.localize( "%foo(...)" ) %][% # will call foo %]
Add Comment
Please, Sign In to add comment