25 Jul 2005 08:52
[patch] Perldoc.pm, for POD2::IT and other pods translations
Enrico Sorcinelli <enrico <at> sorcinelli.it>
2005-07-25 06:52:13 GMT
2005-07-25 06:52:13 GMT
Hi all, after almost two years from RFC, italian Perl users (finally!) published a large part of translated core Perl pods (including perlfunc and perlfaq*) into the package POD2::IT where 'IT' is the language code. This has been (and currently still is) a very impressive work!(Continue reading)Once the package has been installed, the translated documentation can be accessed with: %> perldoc POD2::IT::<podname> However the -f and -q swithces don't work no longer. So, I've attached the patch to Pod/Perldoc.pm in order to allow also the syntax: %> perldoc -L IT <podname> %> perldoc -L IT -f <function> %> perldoc -L IT -q <FAQregex> I added a -L switch that allow to define language code for desired language translation. If POD2::<code> package doesn't exists, the effect of the switch will be ignored. Since 'search_perlfunc' uses hard coded string 'Alphabetical Listing of Perl Functions' to skip introduction, in order to make to work it with other languages with the option -L, I used a simple plugin-like mechanism. POD2::<code> language package must export 'search_perlfunc_re' that returns a localized translation of the paragraph string. This string will be used to skip
Once the package has been installed, the translated documentation can be
accessed with:
%> perldoc POD2::IT::<podname>
However the -f and -q swithces don't work no longer.
So, I've attached the patch to Pod/Perldoc.pm in order to allow also the
syntax:
%> perldoc -L IT <podname>
%> perldoc -L IT -f <function>
%> perldoc -L IT -q <FAQregex>
I added a -L switch that allow to define language code for desired language
translation. If POD2::<code> package doesn't exists, the effect of the switch
will be ignored.
Since 'search_perlfunc' uses hard coded string 'Alphabetical Listing of Perl
Functions' to skip introduction, in order to make to work it with other
languages with the option -L, I used a simple plugin-like mechanism.
POD2::<code> language package must export 'search_perlfunc_re' that returns a
localized translation of the paragraph string. This string will be used to skip
RSS Feed