use strict; use warnings; use v5.010; use HTML::Template::Compiled 0.99; use HTML::Template::Compiled::Plugin::Translate; my $map = { welcome => ["Willkommen bei %1s"], user_online => ["Es ist %1s Nutzer online", "Es sind %1s Nutzer online"], }; my $t = HTML::Template::Compiled::Plugin::Translate->new({ map => $map }); my $htc = HTML::Template::Compiled->new( filename => "translate.html", tagstyle => [qw/ +tt /], plugin => [$t], ); $htc->param( usercount => 2, domain => "example.org", ); say $htc->output;