Locale:...Category(3)
π NAME π
okay bestie, so this is Locale::TextDomain::OO::Plugin::Expand::BabelFish::Loc::DomainAndCategory β it's a Perl module (section 3 of the manual, so it's a library thing, not a command you run π«Ά) and it gives you methods for dynamic domain and/or category, prefixed with loc_b. that's the whole vibe.
$Id: DomainAndCategory.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/Gettext/Loc/DomainAndCategory.pm
$
β¨ VERSION β¨
1.030 β that's the one, no cap π
π¦ DESCRIPTION π¦
so these methods are switching the domain and/or category during the translation process. like, mid-translation. iconic behavior fr.
ngl tho, the author themselves says: "I am not sure if that is the best way to do. Maybe that will change in future." π so like... it works, but don't build your whole personality on it, bestie.
π SYNOPSIS π
my $loc = Locale::Text::TextDomain::OO->new(
plugins => [ qw (
Expand::BabelFish::Loc::DomainAndCategory
...
)],
...
);
π SUBROUTINES/METHODS π
πΈ Switch methods
loc_begin_bd,loc_end_bdβ these ones switch the domain.
$loc->loc_begin_bd($domain);
now all translations are using the lexicon of that domain. periodt.
$loc->loc_end_bd;
and now all translations are using the lexicon from before the call of loc_begin_bd. we rewinding, we restoring, we healing π«Ά
loc_begin_bc,loc_end_bcβ these ones switch the category.
$loc->loc_begin_bc($category);
all translations using the lexicon of that category β¨
$loc->loc_end_bc;
all translations using the lexicon before call of loc_begin_bc. back to baseline, bestie.
loc_begin_bdc,loc_end_bdcβ these ones switch the domain and category. both. at once. main character energy π
$loc->loc_begin_bdc($domain, $category);
all translations using the lexicon of that domain and category.
$loc->loc_end_bdc;
all translations using the lexicon before call of loc_begin_bdc. we return to sender, no notes π
π Translation methods
loc_bd,loc_bdpβ switch to that domain, translate, and switch back. the whole glow-up AND the glow-down, in one move.
$translation = $loc->loc_bd('domain', 'msgid', ...);
other methods are similar extended. the domain is the 1st parameter.
loc_bc,loc_bcpβ switch to that category, translate, and switch back.
$translation = $loc->loc_bc('msgid', 'category', ...);
other methods are similar extended. the category is the last parameter but before the placeholder replacement parameters. iykyk π
loc_bdc,loc_bdcpβ switch to that domain and category, translate, and switch back both. double the switching, double the slay π₯
$translation = $loc->loc_bdc('domain', 'msgid', 'category', ...);
other methods are similar extended. the domain is the 1st parameter. the category is the last parameter but before the placeholder replacement parameters.
Nloc_bd,Nloc_bdpβ none translating methods with domain π«πNloc_bc,Nloc_bcpβ none translating methods with category π«ποΈNloc_bdc,Nloc_bdcpβ none translating methods with domain and category π«πποΈ
π EXAMPLE π
inside of this distribution is a directory named example. run this *.pl files. go off, bestie, the examples are right there waiting for you π
π DIAGNOSTICS π
nothing. literally nothing. silence. peaceful. π
π§ CONFIGURATION AND ENVIRONMENT π§
none. no env vars, no config, no drama. clean girl aesthetic.
β DEPENDENCIES β
Locale::Utils::PlaceholderBabelFishMoo::RoleLocale::TextDomain::OO::Plugin::Expand::BabelFish::LocLocale::TextDomain::OO::Role::DomainAndCategory
these are the besties this module cannot function without. ride or die, fr fr π«Ά
π INCOMPATIBILITIES π
not known. so far so good, no enemies detected π
π BUGS AND LIMITATIONS π
none. flawless. (as far as we know. π )
π SEE ALSO π
Locale::TextDoamin::OO
(yes, spelled exactly like that β we do not fix the original, we respect the original, we copy it character for character π)
πΈ AUTHOR πΈ
Steffen Winkler π
π LICENSE AND COPYRIGHT π
Copyright (c) 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 a wrap, bestie!! β¨ this page came to you fromperl v5.42.0, dated2025-07-25, straight out of theLocale:...Category(3)manual. go translate something gorgeous, 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