Lingua::FA::Number - Converts English numbers to their Persian (Farsi) HTML/Unicode equivalent


Lingua-FA-Number documentation Contained in the Lingua-FA-Number distribution.

Index


Code Index:

NAME

Top

Lingua::FA::Number - Converts English numbers to their Persian (Farsi) HTML/Unicode equivalent

SYNOPSIS

Top

  use Lingua::FA::Number;
  print Lingua::FA::Number::convert ("1 2 3 4");

ABSTRACT

Top

  This module converts the English numbers to their Persian (Farsi) HTML/Unicode equivalent

DESCRIPTION

Top

  Converts all occurences of numbers in a string to their Persian (Farsi) HTML/unicode equivalents

  HTML portion is done for now.

EXPORT

None by default.

SEE ALSO

Top

http://www.cpan.org/

AUTHOR

Top

Ahmad Anvari <http://www.anvari.org/bio/>

COPYRIGHT AND LICENSE

Top


Lingua-FA-Number documentation Contained in the Lingua-FA-Number distribution.

##################################################
# Lingua::FA::Number
#
# Ahmad Anvari, 2003
##################################################

package Lingua::FA::Number;

use strict;
use warnings;
use Exporter;
use AutoLoader qw(AUTOLOAD);

our @ISA = qw(Exporter);

our %EXPORT_TAGS = ( 'all' => [ qw(
	
) ] );

our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );

our @EXPORT = qw(
	
);

our $VERSION = '1.00';

# Preloaded methods go here.


sub convert { 
  $_ = shift; 
  s/(\d)/"&#".(1728+ord($1)).";"/eg; # farsiaze digits
  return $_;
}

# Autoload methods go after =cut, and are processed by the autosplit program.

1;
__END__
# Below is stub documentation for your module. You'd better edit it!