Dist::...ompile(3pm)
π NAME π
Dist::Zilla::App::Command::msg_compile β bestie, this is the command that compiles your language translation files β¨ It lives in the User Contributed Perl Documentation corner of the manual universe, and it's about to make your i18n era iconic π
πΈ SYNOPSIS πΈ
okay so first you gotta set it up in dist.ini, like:
[LocaleTextDomain]
textdomain = My-App
lang_dir = po
and then on the command line you just go:
dzil msg-compile po/fr.po
periodt π
π¦ DESCRIPTION π¦
So what this command actually does is take one or more GNU gettext-style language catalogs (gettext is over at <http://www.gnu.org/software/gettext/> if you wanna meet it) and compile them into a directory inside your distribution. The whole point? Being able to compile just a catalog while you're actively working on it, so you can vibe-check how it looks β without having to compile your entire distribution every single time π honestly a lifesaver.
It's flexible too, she contains multitudes:
- it can compile the specific translation files you point at, or
- it'll scan the language directory and compile all the translation files in the distribution π
For its settings it leans on the LocaleTextDomain plugin (iykyk), and it does require that the GNU gettext utilities be available. No gettext, no party π
β OPTIONS β
-dβ the short queen herself. Short form of the destination directory option below π--dest-dirβ where the compiled catalogs go, bestie. The compiled language files get stored in this directory asLocaleData/$language/LC_MESSAGES/$textdomain.mo. And as long as that directory is in Perl's@INC,Locale::TextDomainshould be able to find them there π«Ά Defaults to the current directory, no cap.--msgfmtβ tells her where themsgfmtprogram lives.msgfmtships with GNU gettext (<http://www.gnu.org/software/gettext/>). Defaults to justmsgfmt(ormsgfmt.exeon Windows), which should totally work if it's chillin' in your path β¨
π AUTHOR π
David E. Wheeler <david@justatheory.com> β the main character who wrote this π
π CONTRIBUTOR π
Charles McGarvey <ccm@cpan.org> β iconic assist, we love to see it π¦
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2012-2017 by David E. Wheeler.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and remix, bestie π
and that's the whole page, fr fr β¨ this lil' gem was documented by User Contributed Perl Documentation and the footer stamps it with perl v5.26.2, dated 2018-07-08 β a whole vintage moment, and still slaying to this day ππ
π«Ά
π¦ where this page comes from
- debian bookworm: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libdist-zilla-localetextdomain-perl 0.91-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libdist-zilla-localetextdomain-perl 0.91-3 Β· 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