Returns a new object which copies info from original, and updates it with the specified OPTIONS and VARIABLES. The advantage is that the cached translations are shared between the objects.
my $s = __x "found {nr} files", nr => 5; my $t = $s->clone(nr => 3); my $t = $s->(nr => 3); # equivalent print $s; # found 5 files print $t; # found 3 files
Option | Default |
---|---|
_append |
|
_category |
|
_count |
|
_domain | from |
_expand |
|
_msgid |
|
_plural |
|
_prepend |
|
Returns the string or Log::Report::Message object which is appended
after this one. Usually undef
.
This method implements the overloading of concatenation, which is needed
to delay translations even longer. When PREPEND is true, the STRING
or OBJECT (other Log::Report::Message
) needs to prepended, otherwise
it is appended.
print __"Hello" . ' ' . __"World!"; print __("Hello")->concat(' ')->concat(__"World!")->concat("\n");
Returns the domain of the first translatable string in the structure.
Returns the msgid which will later be translated.
Returns the string which is prepended to this one. Usually undef
.
Translate a message. If not specified, the default locale is used.
Return the concatenation of the prepend, msgid, and append strings. Variable expansions within the msgid is not performed.