perldoc -L adds language support

brian_d_foy on 2007-09-04T16:11:00

Pod::Perldoc has a recently introduced feature via a new switch -L.

$ perldoc -L it perlintro # perlintro in Italian
$ perldoc -L fr -f pack # read about pack in French
$ perldoc -L eo -q shell # search Esperanto FAQs about 'shell'
$ perldoc -L tlh Acme::DonMartin # the docs of Acme::DonMartin in Klingon

(Obviously, it works if you have installed the corresponding translated PODs.)

These changes were applied to bleadperl and published on CPAN in release 3.14_01. The original work by Italian mongers were followed by a similar distribution of a French translation package (POD2::IT and POD2::FR). These distributions relied on a certain amount code that Pod::Perldoc called in the manner of a plugin.

After some work on the underlying code, it became evident that the essential of the distribution of the translated PODs was amazingly simple. Stuff PODs in the corresponding POD2::<lang> namespace. There's not much more about it (and there is some work in progress on the stuff that remains).

With a lift in the original code in POD2::IT and some corresponding changes of Pod::Perldoc, it is possible to distribute and use translated PODs in a very simple way. The current steps are:

and voilà. Silly internationalization at perldoc level working.

I am taking a time, waiting for bugs to show up, feedback, and will submit these changes to bleadperl.