perl-i18n

Re: Localized PODs

2003-01-29 12:03:18
On Thu, Jan 30, 2003 at 02:00:06AM +0800, Autrijus Tang 
(autrijus(_at_)autrijus(_dot_)org) said something similar to:
On Wed, Jan 29, 2003 at 11:42:33AM -0500, Kevin Meltzer wrote:
I like this idea. Of course, this means module authors will also have
to create and maintain multiple PODs :-) Should h2xs be patched to
create stub files for alternate languages/encodings.. something like:

h2xs -<your normal switches> -l zh_TW,Big5 Foo::Bar

That's a very good idea.

Good. So my Good Idea Quota for 2003 is met.
 
Which would create Foo/Bar.zh_TW.pod and Foo/Bar.Big5.pod?

mm, no, the idea is zh_TW is all that's needed.  Big5 is merely its
encoding; it can be declared in POD like:

      =for encoding big5

      =head1 ...
      ...

The patch enabling this is already sent to Sean Burke.

So since I happen to use zh_TW.UTF-8 as the locale, perldoc would
DWIM and convert its data on the fly.

Gotcha.
 
This would at least encourage people to do this. I would, though, get
nervous that if I was seeing the Big5 POD, and it wasn't kept up to
date, I would be missing info contained in  the 'default' POD. 

That's certainly true.  However that should not forbid people to do
this; anybody that waits the 'default' POD should either set their
locale to 'en' (which is, by default, the official language of perl
documentations), or use 'perldoc -L en' to explicitly request for it.

Makes sense. I'd hope there would be a way, though, to somehow know
that the big5 encoding wasn't updated, but en was. If for nothing else,
to alert an author during a 'make dist'... "Hey Pal! Update the X, Y
and Z POD encodings!" This may be a little more complicated, as
something would have to keep track. Maybe I will give this some
thought.

Cheers,
Kevin

/Autrijus/



-- 
[Writing CGI Applications with Perl - http://perlcgi-book.com]
"The California crunch really is the result of not enough power-generating
plants and then not enough power to power the power of generating plants."
        -- G.W. Bush, Interview with New York Times 01/14/2001

<Prev in Thread] Current Thread [Next in Thread>