LOCALE::PO4A::PO.3PM(1) User Contributed Perl Documentation Locale::Po4a::Po -- PO use Locale::Po4a::Po; my $pofile=Locale::Po4a::Po->new(); # PO $pofile->read('file.po'); # $pofile->push('msgid' => 'Hello', 'msgstr' => 'bonjour', 'flags' => "wrap", 'reference'=>'file.c:46'); # $pofile->gettext("Hello"); # 'bonjour' # $pofile->write('otherfile.po'); Locale::Po4a::Po . ( , , po), . PO info gettext ( <>). po4a. PO ( ) -, ( , info), , debconf -, . , --porefs . never, ; file, ; counter, ; full, ( : full). --wrap-po no|newlines| ( : 76) po. , git, , , . , gettext po , 77- , . po4a. , po4a po . newlines, po4a msgid msgstr . no, po4a po . gettext, . , , msgid msgstr, , . --msgid-bugs-address @. msgid ( ). , POT Report- Msgid-Bugs-To. --copyright-holder POTr. <> --package-name POT. <>. --package-version POT. <>. , new() . , PO, . read($) PO ( ). self , . write($) . write_if_needed($$) write, PO POT , ' , , ( , POT POT). filter($) . - , . , Perl, , true. Perl ;) gettext($%) , , . () , . , , . : wrap , , . <> (<<>>), , , . wrapcol , ( : 76). stats_get() stats_clear(). , , -- , msgfmt --statistic. PO, msgfmt -- . : [ PO ] ($percent,$hit,$queries) = $pofile->stats_get(); print " $percent\% ($hit $queries) .\n"; stats_clear() gettext. push(%) . . : msgid . msgstr . reference , . : file.c:46 ( <>, 46). , . comment , (). . automatic , . --add-comments xgettext. flags , . : c-text, python-text, lisp-text, elisp-text, librep-text, smalltalk-text, java-text, awk-text, object- pascal-text, ycp-text, tcl-text, wrap, no-wrap and fuzzy. gettext. type : gettext . ' PO, msgid msgid, -- msgstr. , , msgid ' PO , ( <>, <>, <

> DocBook). , , , . PO, , . wrap , , . true, . PO wrap no-wrap. wrapcol ignored; the key is kept for backward computability. count_entries() ( ). count_entries_doc() . , . msgid($) msgid . msgid_doc($) msgid . type_doc($) msgid . , , gettext, {$msgid}{'type'}, , $msgid . get_charset() , PO. , <>. Denis Barbier Martin Quinson (mquinson#debian.org) perl v5.38.2 2024-06-26 LOCALE::PO4A::PO.3PM(1)