NAME
Lingua::IW::Logical - module for working with logical and visual hebrew
SYNOPSIS
use Lingua::IW::Logical;
$visual = log2vis_string($logical)
$vistext = log2vis_text($logtext)
$vistext = log2vis_text($logtext,$linelength)
$vistext = log2vis_text($logtext,$linelength,$start)
$vistext = log2vis_text($logtext,$linelength,$start,$end)
DESCRIPTION
This module is intended to automate task of converting logical Hebrew to visual Hebrew.
log2vis_string STRING
This function converts it's argument from logical representaion to visual (renders it like it should be printed).
log2vis_text STRING,LENGTH,START,END
This function allows to convert blocks of text, using log2vis_string
. All arguments except the first are optional. LENGTH defines the maximal length of the resulting line, with default of 80. START defines the text added before each line of the resulting text. If START is undefined, the line is padded so that the text is right-aligned. END defines what is added after each line of text. Default is newline.
Example 1:
#!/usr/bin/perl
use Hebrew;
while(<>)
{
print log2vis_text($_);
}
This short program will convert any text in logical Hebrew to readable visual Hebrew.
Example 2:
#!/usr/bin/perl
use Hebrew;
while(<>)
{
print log2vis_text($_,80,"<nobr>","</nobr><br>\n");
}
This example show how you can HTML-ize file in logical hebrew, so that you can put it on the web page.
KNOWN BUGS
Bug reports are welcome.
AUTHOR
Stanislav Malyshev (frodo@sharat.co.il)