perl-i18n

localizing Pod

2003-01-30 05:36:20
I want to make sure I understand what's being suggested here. I've been a distracted lately, so I'm merrily doublechecking.

As far as I can tell, there's two distinct ideas that Autrijus is suggesting:

1) Get Pod parsers to support different input encodings, which all get translated to Unicode in their internal form. (I.e., the "=for encoding encname" just saves you the bother of running that file thru encname2unicode before sending it to a Pod parser.) I've been looking for some way in which this suggestion is problematic, and I don't see any real problems, other than obvious trouble with old tools not understanding odd encodings like UTF16.

(What do people think about my adding a rule that if you have a =for encoding, it has to be the first Pod directive in a file? And the corollary that you can't have two =for encoding's in a file.)


2) Get perldoc (Pod::Perldoc) to add a language "infix" to the filenames it searches for pod under. So assume that currently, when I do "perldoc Foo::Bar", it looks across @INC (etc) for:
EACH-INC-DIR/Foo/Bar.pod
EACH-INC-DIR/Foo/Bar.pm
EACH-INC-DIR/Foo/Bar.pl
Autrijus's suggestion, as I understand it, is simply to be able to say to perldoc "hey, I like fr" (via a switch and/or env var), and have its search be for:
EACH-INC-DIR/Foo/Bar_fr.pod
EACH-INC-DIR/Foo/Bar_fr.pm
EACH-INC-DIR/Foo/Bar_fr.pl
EACH-INC-DIR/Foo/Bar.pod
EACH-INC-DIR/Foo/Bar.pm
EACH-INC-DIR/Foo/Bar.pl
Right?

(Well, leaving aside the question of Bar_fr.pod versus Bar-fr.pod versus Bar.fr.pod -- later on, we'll pick one way and stick with it.)

I'm tempted to say that this second suggestion seems fine to me as long as this does NOT turn into a mess where anyone expects his "I like'fr" to match the Foo/Bar-fr-ca.pm, or "fr-ca" to match the Foo/Bar-fr.pm. I'm also tempted to say that these language tags must must must be lowercase, always, under penalty of agonizing death. And also that it if you provide a Bar-fr.pm, you must mention it in Bar.pm, so that no-one can say "But how was I supposed to know that file was there? Read the MANIFEST?!"
Does this sound reasonable?


Did I understand everything right?
And: suggestion 1 and suggestion 2 are totally independent ideas, right?
--
Sean M. Burke    http://search.cpan.org/~sburke/


<Prev in Thread] Current Thread [Next in Thread>
  • localizing Pod, Sean M. Burke <=