Locale:...ategory(3)
π Locale::TextDomain::OO::Plugin::Expand::Gettext::DomainAndCategory π
okay bestie, so this one is a Perl module from the Locale::TextDomain::OO world β it lives under Locale/TextDomain/OO/Plugin/Expand/Gettext/DomainAndCategory.pm and it's all about methods for dynamic domain and/or category, prefixed with __. Yes, the double underscore is the whole vibe. Periodt.
The manual page itself is Locale:...ategory(3) (the terminal truncates it, iconic of it honestly), and it's part of the User Contributed Perl Documentation.
$Id: DomainAndCategory.pm 689 2017-08-29 21:37:38Z steffenw $
$HeadURL: svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Plugin/Expand/Gettext/DomainAndCategory.pm $
β¨ VERSION β¨
1.030
π¦ DESCRIPTION π¦
These methods switch the domain and/or category during the translation process. Like, mid-translation glow-up. π
ngl, the author is not sure if that is the best way to do it. Maybe that will change in the future. We love honesty fr fr.
πΈ SYNOPSIS πΈ
my $loc = Locale::Text::TextDomain::OO->new(
plugins => [ qw (
Expand::Gettext::DomainAndCategory
...
)],
...
);
π SUBROUTINES/METHODS π
π methods __d, __dn, __dp, __dnp, __dx, __dnx, __dpx, __dnpx
All translations using the lexicon before the call of __begin_d.
π methods __begin_c, __end_c
Switch the category.
$loc->__begin_c($category);
All translations using the lexicon of that category.
$loc->__end_c;
All translations using the lexicon before the call of __begin_c.
π methods __begin_dc, __end_dc
Switch the domain and category.
$loc->__begin_dc($domain, $category);
All translations using the lexicon of that domain and category.
$loc->__end_dc;
All translations using the lexicon before the call of __begin_dc.
π Translation methods π
methods __d, __dn, __dp, __dnp, __dx, __dnx, __dpx, __dnpx
Switch to that domain, translate, and switch back. Slay and return. β¨
$translation = $loc->__dx('domain', 'msgid', key => value );
Other methods are similar, just extended. The domain is the 1st parameter.
methods __c, __cn, __cp, __cnp, __cx, __cnx, __cpx, __cnpx
Switch to that category, translate, and switch back.
$translation = $loc->__cx('msgid', 'category', key => value );
Other methods are similar, just extended. The category is the last parameter, but before the placeholder replacement hash/hash_ref. iykyk.
methods __dc, __dcn, __dcp, __dcnp, __dcx, __dcnx, __dcpx, __dcnpx
Switch to that domain and category, translate, and switch back both.
$translation = $loc->__dcx('domain', 'msgid', 'category', key => value );
Other methods are similar, just extended. The domain is the 1st parameter. The category is the last parameter, but before the placeholder replacement hash/hash_ref.
methods N__d, N__dn, N__dp, N__dnp, N__dx, N__dnx, N__dpx, N__dnpx
none translating methods with domain
methods N__c, N__cn, N__cp, N__cnp, N__cx, N__cnx, N__cpx, N__cnpx
none translating methods with category
methods N__dc, N__dcn, N__dcp, N__dcnp, N__dcx, N__dcnx, N__dcpx, N__dcnpx
none translating methods with domain and category
π§ EXAMPLE π§
Inside of this distribution is a directory named example. Run this *.pl files. π
π DIAGNOSTICS π
nothing
π CONFIGURATION AND ENVIRONMENT π
none
β DEPENDENCIES β
Locale::Utils::PlaceholderNamedMoo::RoleLocale::TextDomain::OO::Plugin::Expand::GettextLocale::TextDomain::OO::Role::DomainAndCategory
π INCOMPATIBILITIES π
not known
π BUGS AND LIMITATIONS π
none
π₯ SEE ALSO π₯
Locale::TextDoamin::OO
(yes bestie, that's spelled exactly how the original spells it β TextDoamin. Not my typo, not your typo. We don't touch the lore. π
)
π AUTHOR π
Steffen Winkler
π«Ά LICENSE AND COPYRIGHT π«Ά
Copyright (c) 2013 - 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 was perl v5.42.0, dated 2025-07-25, and it's giving Locale:...ategory(3) energy from start to finish. go forth and translate dynamically. no cap. πβ¨
π¦ 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