Catman...x::i18n(3pm)
π Catmandu::Fix::i18n β it's giving "lookup value in I18N" π
okay bestie, so this is a page from the Catmandu...x::i18n(3pm) manual β User Contributed Perl Documentation, to be exact. It's all about Catmandu::Fix::i18n, which is literally the fix that goes and looks up a value in I18N for you. Translation queen behaviour. πβ¨
πΈ NAME πΈ
Catmandu::Fix::i18n β lookup value in I18N
β¨ SYNOPSIS β¨
use Catmandu::Sane;
use Catmandu;
#In your catmandu config
Catmandu->config->{i18n} = {
en => [
"Gettext",
"/path/to/en.po"
],
nl => [
"Gettext",
"/path/to/nl.po"
]
};
#In your fix
#simple lookup
i18n( "title", config => "i18n", lang => "en" )
#lookup with arguments
add_field("args.$append","Nicolas")
i18n( "greeting", config => "i18n", lang => "en", args => "args" )
no cap, that's the whole vibe: you set up your i18n config, then you just tell the fix what to look up and which language you're feeling today. π«Ά
π CONSTRUCTOR ARGUMENTS π
path- path to i18n key
- specified as fix argument
- required β you literally cannot skip this one bestie
config- path to i18n configuration in the Catmandu config
- specified as fix option
- required
lang- language to use
- specified as fix option
- required
args- path in current record where arguments are stored. Must be an array.
- specified as fix option
- optional β this one's just vibes, you can leave it out
π AUTHORS π
Nicolas Franck <nicolas.franck at ugent.be> β shoutout to the icon who wrote this π
π¦ SEE ALSO π¦
Catmandu::I18N, Catmandu, Locale::Maketext
go read those next, iykyk πβ¨
π LICENSE AND COPYRIGHT π
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See <http://dev.perl.org/licenses/> for more information.
fr fr, it's free software β go forth and remix, just respect the license terms. π
and that's the whole page, periodt. π this was perl v5.36.0, dated 2023-02-04, straight from the Catman...x::i18n(3pm) manual. mwah π
π¦ where this page comes from
- debian bookworm: libcatmandu-i18n-perl 0.01-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-i18n-perl 0.01-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-i18n-perl 0.01-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-i18n-perl 0.01-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-i18n-perl 0.01-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms