| Lingua-HU-Numbers documentation | view source | Contained in the Lingua-HU-Numbers distribution. |
use Lingua::HU::Numbers qw/num2hu num2hu_ordinal/;
my $number = "42";
my $foo = num2hu($number);
print $foo;
prints
negyvenkettő
Lingua::HU::Numbers is a module converting numbers (like "42") into their Hungarian language representation ("negyvenkettő").
The module provides two optionally exported functions that can be exported:
num2hu and num2hu_ordinal.
Please see the README file for details of Hungarian grammar.
It takes a scalar value which currently must be a real number smaller than -+10**66. The return value is a scalar expressing the Hungarian text version of the given number.
This function takes a scalar value which must be a positive integer smaller than 10**66. The return value is a scalar expressing the Hungarian ordinal text form of the specified number.
The module cannot handle numbers larger than -+10**66 at the moment.
Exponential notation, fraction support will be added in the next few releases. Patches (and accompanying tests) are welcome.
The module aims to remain similar in structure to Lingua::EN::Numbers, so that those familiar with that module can use this one easily.
Bálint Szilakszi, <szbalint at cpan.org>
Please report any bugs or feature requests to
bug-lingua-hu-numbers at rt.cpan.org, or through the web interface at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-HU-Numbers.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
Sean M. Burke for writing Lingua::EN::Numbers, which this module is modelled from.
Copyright 2006-2008 Bálint Szilakszi.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Lingua-HU-Numbers documentation | view source | Contained in the Lingua-HU-Numbers distribution. |