NAME
POD2::FR - French translation of Perl core documentation
SYNOPSIS
%> perldoc POD2::FR::<podname>
use POD2::FR;
print_pods();
print_pod('pod_foo', 'pod_baz', ...);
%> perl -MPOD2::FR -e print_pods
%> perl -MPOD2::FR -e print_pod <podname1> <podname2> ...
DESCRIPTION
pod2fr is the french translation project of core Perl pods. This has been (and currently still is) a very big work! :-)
See http://perl.enstimac.fr for more details about the project.
Once the package has been installed, the translated documentation can be accessed with:
%> perldoc POD2::FR::<podname>
EXTENDING perldoc
With the translated pods, unfortunately, the useful perldoc
's -f
and -q
switches don't work no longer.
So, pod2it (italian translation project) made a simple patch to Pod/Perldoc.pm 3.14 in order to allow also the syntax:
%> perldoc -L FR <podname>
%> perldoc -L FR -f <function>
%> perldoc -L FR -q <FAQregex>
The patch adds the -L
switch that allows to define language code for desired language translation. If POD2::<code>
package doesn't exists, the effect of the switch will be ignored.
If you are particularly lazy you can add a system alias like:
perldoc-fr="perldoc -L FR "
in order to avoid to write the -L
switch every time and to type directly:
%> perldoc-fr -f map
You can apply the patch with:
%> patch -p0 `perl -MPod::Perldoc -e 'print $INC{"Pod/Perldoc.pm"}'` < /path/to/Perldoc.pm-3.14-patch
The patch lives under ./patches/Perldoc.pm-3.14-patch shipped in the distribution of POD::IT package.
Note that the patch is for version 3.14 of Pod::Perldoc (included into Perl 5.8.7). If you have a previous Perl distro (but >= 5.8.1) and you are impatient to apply the patch, please upgrade your Pod::Perldoc module to 3.14! ;-)
See search_perlfunc_re
API for more information.
API
The package exports following functions:
print_pods
Prints all translated pods and relative Perl original version.
print_pod
Prints relative Perl original version of all pods passed as arguments.
search_perlfunc_re
Since Pod/Perldoc.pm's
search_perlfunc
method uses hard coded string "Alphabetical Listing of Perl Functions" (as regexp) to skip introduction, in order to make the patch to work with other languages with the option-L
, we used a simple plugin-like mechanism.POD2::<code>
language package must exportsearch_perlfunc_re
that returns a localized translation of the paragraph string above. This string will be used to skip perlfunc.pod intro. Again, ifPOD2::<code>->search_perlfunc_re
fails (or doesn't exist), we'll come back to the default behavoiur. This mechanism allows to add additionalPOD2::*
translations without need to patch Pod/Perldoc.pm every time.
Comment fonctionne le projet de traduction
pod2fr est un projet qui est né en 1998/1999 par la volonté d'un groupe de contributeurs du forum de discussions Perl francophone (fr.comp.lang.perl). Il a été animé par Marc Carmier. Le site web http://perl.enstimac.fr donne l'accès à tous les documents traduits.
À ce jour, il n'y a malheureusement plus vraiment de groupe de traduction. Il est possible que le groupe de traducteurs/relecteurs se réorganise et, lorsque cela arrivera, vous trouverez de plus amples informations sur le forum ou le site cité ci-dessus.
En attendant que le projet redémarre et en se calquant sur le module POD2::IT (merci à eux pour le travail d'intégration), nous avons créé ce module POD2::FR afin que tout le monde puisse profiter du travail déjà effectué. De temps à autre, de nouvelles traductions s'ajoutent au gré des envies de chacun. Pour toute remarque ou contribution, vous pouvez toujours me contacter : <paul.gaborit+perl AT enstimac DOT fr>.
AUTHOR
POD2::FR package is currently maintained by Paul Gaborit <paul.gaborit+perl AT enstimac DOT fr>.
ACKNOWLEDGEMENTS
This package is based on POD2::IT package. Thank you, pod2it group.
SEE ALSO
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 303:
Non-ASCII character seen before =encoding in 'né'. Assuming CP1252