山科 氷魚 (YAMASHINA Hio)

NAME

Pod::MultiLang - multi languages in Pod

VERSION

Version 0.14

SYNOPSIS

  use Pod::MultiLang::Html;
  my $parser = Pod::MultiLang::Html->new(langs=>[qw(ja en)]);
  $parser->parse_from_file($infile,$outfile);

DESCRIPTION

Pod::MultiLang is a pod extension. This module implements J<> interior sequence for write multi languages in single pod. One languages enclosed by J interior sequence in each paragraph. Some heading words are translated automatically. Note that J<> is not official interior sequence, this is custom one.

New format for L<|/> interior sequence is:

 J<<< ja;
 L<< text | page /"heading J<ja; japanese heading >" >>
 >>>

At section part, English heading is still required. Because in many hypertext formats, link identifier is restricted into ASCII.

Verbatim paragraphs will be joined with one blank line.

EXAMPLE

(with ja.utf8)

  =head1 NAME
  
  Example - Example document
  J<< ja;Example - サンプル >>

  =head1 SEE ALSO
  
  L<example/somewhere>
  J<<< ja;
  L<< example/somewhere J<ja;どこか> >>
  >>>
  
  =cut

sample output.

 en:NAME
 ja:名前
 en:  Example - Example document
 ja:  例 - サンプル
 en:SEE ALSO
 ja:関連項目
 en:  "somewhere" in example (linkto:example/somewhere)
 ja:  example 内 "どこか" (linkto:example/somewhere)

TODO

Multi lingual verbatim paragraph is not supported.

UTILITY METHODS

makelinktext

 $label = $parser->makelinktext($lang,$text,$name,$sec);

if $text is specified, returns $text. if not, returns by $name and $sec with $lang.

parseLang

 ($lang,$text) = $parser->parseLang($data);
 
  $parser->parseLang("ja; text"); ==> ('ja', 'text')

METHODS

new

create new instance.

OVERRIDES

This module implements Pod::Parser.

begin_pod
end_pod
command
textblock
verbatim

AUTHOR

YAMASHINA Hio, <hio at cpan.org>

BUGS

Please report any bugs or feature requests to bug-pod-multilang at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Pod-MultiLang. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Pod::MultiLang

You can also look for information at:

SEE ALSO

Pod::Parser, Pod::MultiLang::Html

COPYRIGHT & LICENSE

Copyright 2006 YAMASHINA Hio, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.