Locale:...aketext(3)
πΈ Locale::TextDomain::OO::Plugin::Expand::Maketext πΈ
okay bestie, welcome to the Locale:...aketext(3) manual page, aka the little plugin that hands you extra maketext methods π we're doing Perl, we're doing i18n, and honestly? it's giving iconic.
$Id: Maketext.pm 651 2017-05-31 18:10:43Z steffenw $
$HeadURL: svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Plugin/Expand/Maketext.pm $
β¨ VERSION β¨
1.027 β that's the one, no cap π
π¦ DESCRIPTION π¦
So this module gives you additional maketext methods, kinda like what Locale::Maketext::Simple does β the whole point is you can run that vibe on projects that are already using Locale::Maketext at the moment. no need to yeet your existing setup, we're just adding sparkle β¨
And listen: if you wanna run maketext with a different context (msgctxt), you run the method maketext_p. that's the whole thing, that's the assignment π
π SYNOPSIS π
my $loc = Locale::Text::TextDomain::OO->new(
plugins => [ qw (
Expand::Maketext
...
)],
...
);
Optional type formatting β go peek at Locale::Utils::PlaceholderMaketext for the possible methods bestie π
$loc->expand_maketext->formatter_code($code_ref);
π SUBROUTINES/METHODS π
πΈ method expand_maketext
It hands you back the Locale::Utils::PlaceholderMaketext object so you can set some options on it. that's it, that's the method π«Ά
my $expander_object = $self->expand_maketext;
β translation methods
π method maketext
This method includes the expansion as 'quant' or '*'. so slay.
print $loc->maketext(
'Hello World!',
);
print $loc->maketext(
'Hello [_1]!',
'Steffen',
);
print $loc->maketext(
'[quant,_1,file read,files read]',
$num_files,
);
π method maketext_p (allows the context)
yes bestie, the _p means it takes a context. watch:
print $loc->maketext_p (
'time',
'to',
);
print $loc->maketext_p (
'destination',
'to',
);
print $loc->maketext_p (
'destination',
'from [_1] to [_2]',
'Chemnitz',
'Erlangen',
);
print $loc->maketext_p(
'maskulin',
'Mr. [_1] has [*,_2,book,books].',
$name,
$books,
);
π§ methods Nmaketext, Nmaketext_p
Okay so here's the tea β the extractor looks for "maketext('..." and it has no problem with "<$loc-"Nmaketext('...>>.
That's literally the whole idea of the N-Methods. big brain energy fr fr.
$loc->Nmaketext('...');
$loc->Nmaketext_p('...', '...');
π₯ EXAMPLE π₯
Inside of this distribution is a directory named example. Run this *.pl files. go on, run 'em, live a little π
π DIAGNOSTICS π
confess
π CONFIGURATION AND ENVIRONMENT π
none
π DEPENDENCIES π
Locale::Utils::PlaceholderMaketextMoo::Role
π INCOMPATIBILITIES π
not known β we love a drama-free module
π BUGS AND LIMITATIONS π
none
π SEE ALSO π
Locale::TextDoamin::OO
(yes, that spelling is exactly what the page says β copying it character for character, not my business to fix π)
β¨ AUTHOR β¨
Steffen Winkler
π LICENSE AND COPYRIGHT π
Copyright (c) 2009 - 2017, Steffen Winkler "<steffenw at cpan.org>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie β you ate that π«Άβ¨
this masterpiece was brought to you by perl v5.42.0, dated 2025-07-25, and generated from the Locale:...aketext(3) page in User Contributed Perl Documentation. mwah π
π¦ where this page comes from
- fedora 43: perl-Locale-TextDomain-OO 1.036-19.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms