METHODS

Constructors

Standard Moo with Dancer2::Core::Role::Template extensions.

Accessors

$obj->tt

Returns the Log::Report::Template object which is performing the template processing. This object gets instantiated based on values found in the Dancer2 configuration file.

Action

$obj->addTextDomain( %options )

Forwards the %options to Log::Report::Template::addTextdomain().

» Example:
  my $lexicon = $directory;  # f.i. $directory/<domain>/nl_NL.utf-8.po
  my $tables  = Log::Report::Translator::POT->new(lexicon => $lexicon);
  (engine 'template')->addTextdomain(name => 'mydomain')->configure(translator => $tables);
$obj->render( $template, \%tokens )

Renders the template. The first arg is a filename for the template file or a reference to a string that contains the template. The second arg is a hashref for the tokens that you wish to pass to manual Template::Toolkit for rendering.

When a translation language is set, then this renderer adds the following variables: language (like "nl"), language_territory (like "nl_BE"), and locale (like "nl_BE.utf8").