1Locale::TextDomain::OO:U:sPelrugCLioonnc:ta:rlEiexb:pu:atTneeddx:t:PDMeoarmklaeitDneo:xc:tuO(mO3e:)n:tPaltuigoinn::Expand::Maketext(3)
2
3
4

NAME

6       Locale::TextDomain::OO::Plugin::Expand::Maketext - Additional maketext
7       methods
8
9       $Id: Maketext.pm 651 2017-05-31 18:10:43Z steffenw $
10
11       $HeadURL:
12       svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Plugin/Expand/Maketext.pm
13       $
14

VERSION

16       1.027
17

DESCRIPTION

19       This module provides additional maketext methods like
20       Locale::Maketext::Simple to run that on projects that use
21       Locale::Maketext at the moment.
22
23       To run maketext with different context (msgctxt) run method maketext_p.
24

SYNOPSIS

26           my $loc = Locale::Text::TextDomain::OO->new(
27               plugins => [ qw (
28                   Expand::Maketext
29                   ...
30               )],
31               ...
32           );
33
34       Optional type formatting see Locale::Utils::PlaceholderMaketext for
35       possible methods.
36
37           $loc->expand_maketext->formatter_code($code_ref);
38

SUBROUTINES/METHODS

40   method expand_maketext
41       Returns the Locale::Utils::PlaceholderMaketext object to be able to set
42       some options.
43
44           my $expander_object = $self->expand_maketext;
45
46   translation methods
47       method maketext
48
49       This method includes the expansion as 'quant' or '*'.
50
51           print $loc->maketext(
52               'Hello World!',
53           );
54
55           print $loc->maketext(
56               'Hello [_1]!',
57               'Steffen',
58           );
59
60           print $loc->maketext(
61               '[quant,_1,file read,files read]',
62               $num_files,
63           );
64
65       method maketext_p (allows the context)
66
67           print $loc->maketext_p (
68               'time',
69               'to',
70           );
71
72           print $loc->maketext_p (
73               'destination',
74               'to',
75           );
76
77           print $loc->maketext_p (
78               'destination',
79               'from [_1] to [_2]',
80               'Chemnitz',
81               'Erlangen',
82           );
83
84           print $loc->maketext_p(
85               'maskulin',
86               'Mr. [_1] has [*,_2,book,books].',
87               $name,
88               $books,
89           );
90
91       methods Nmaketext, Nmaketext_p
92
93       The extractor looks for "maketext('..."  and has no problem with
94       "<$loc-"Nmaketext('...>>.
95
96       This is the idea of the N-Methods.
97
98           $loc->Nmaketext('...');
99           $loc->Nmaketext_p('...', '...');
100

EXAMPLE

102       Inside of this distribution is a directory named example.  Run this
103       *.pl files.
104

DIAGNOSTICS

106       confess
107

CONFIGURATION AND ENVIRONMENT

109       none
110

DEPENDENCIES

112       Locale::Utils::PlaceholderMaketext
113
114       Moo::Role
115

INCOMPATIBILITIES

117       not known
118

BUGS AND LIMITATIONS

120       none
121

SEE ALSO

123       Locale::TextDoamin::OO
124

AUTHOR

126       Steffen Winkler
127
129       Copyright (c) 2009 - 2017, Steffen Winkler "<steffenw at cpan.org>".
130       All rights reserved.
131
132       This module is free software; you can redistribute it and/or modify it
133       under the same terms as Perl itself.
134
135
136
137perl v5.32.0               Locale:2:0T2e0x-t0D7o-m2a8in::OO::Plugin::Expand::Maketext(3)
Impressum