NAME
Log::Report::Template::Textdomain - template translation with one domain
INHERITANCE
Log::Report::Template::Textdomain
is a Log::Report::Domain
is a Log::Report::Minimal::Domain
SYNOPSIS
my $templater = Log::Report::Template->new(...);
my $domain = $templater->newTextdomain(%options);
DESCRIPTION
Manage one translation domain for Log::Report::Template.
Extends "DESCRIPTION" in Log::Report::Domain.
METHODS
Extends "METHODS" in Log::Report::Domain.
Constructors
Extends "Constructors" in Log::Report::Domain.
- Log::Report::Template::Textdomain->new(%options)
-
-Option --Defined in --Default lexicon undef name Log::Report::Minimal::Domain <required> only_in_directory undef translation_function 'loc'
- lexicon => DIRECTORY
- name => STRING
- only_in_directory => DIRECTORY|ARRAY
-
The textdomain can only be used in the indicated directories: if found anywhere else, it's an error. When not specified, the function is allowed everywhere.
- translation_function => STRING
-
The name of the function as used in the template to call for translation. See function(). It must be unique over all text-domains used.
Attributes
Extends "Attributes" in Log::Report::Domain.
- $obj->configure(%options)
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->contextRules()
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->defaultContext()
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->expectedIn($filename)
-
Return true when the function name which relates to this domain is allowed to be used for the indicated file. The msgid extractor will warn when there is no match.
- $obj->function()
-
Returns the name of the function which is used for translations.
- $obj->isConfigured()
-
Inherited, see "Attributes" in Log::Report::Minimal::Domain
- $obj->lexicon()
-
Directory where the translation tables are kept.
- $obj->name()
-
Inherited, see "Attributes" in Log::Report::Minimal::Domain
- $obj->nativeLanguage()
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->readConfig($filename)
- Log::Report::Template::Textdomain->readConfig($filename)
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->setContext(STRING|HASH|ARRAY|PAIRS)
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->translator()
-
Inherited, see "Attributes" in Log::Report::Domain
- $obj->updateContext(STRING|HASH|ARRAY|PAIRS)
-
Inherited, see "Attributes" in Log::Report::Domain
Action
Extends "Action" in Log::Report::Domain.
- $obj->interpolate( $msgid, [$args] )
-
Inherited, see "Action" in Log::Report::Minimal::Domain
- $obj->translate($message, $language)
-
Inherited, see "Action" in Log::Report::Domain
Translating
- $obj->translationFunction()
-
This method returns a CODE which is able to handle a call for translation by Template Toolkit.
DETAILS
Extends "DETAILS" in Log::Report::Domain.
SEE ALSO
This module is part of Log-Report-Template distribution version 0.13, built on January 23, 2018. Website: http://perl.overmeer.net/CPAN/
LICENSE
Copyrights 2017-2018 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/