Guest User

Untitled

a guest
Feb 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. my $loc = Data::Localizer->new;
  2. $loc->add_localizer(
  3. Data::Localize::Gettext->new(
  4. formatter => Data::Localze::Format::Gettext->new(
  5. functions => {
  6. foo => sub {
  7. # do something and return localized text
  8. return ...;
  9. },
  10. bar => sub {
  11. ...
  12. }
  13. }
  14. )
  15. )
  16. );
  17.  
  18. [% loc.localize( "%foo(...)" ) %][% # will call foo %]
Add Comment
Please, Sign In to add comment