
Lingua::Any::Numbers - Converts numbers into (any available language) string.

use Lingua::Any::Numbers qw(:std); printf "Available languages are: %s\n", join( ", ", available ); printf "%s\n", to_string( 45 ); printf "%s\n", to_ordinal( 45 );
or test all available languages
use Lingua::Any::Numbers qw(:std);
foreach my $lang ( available ) {
printf "%s\n", to_string( 45, $lang );
printf "%s\n", to_ordinal( 45, $lang );
}

This document describes version 0.43 of Lingua::Any::Numbers released on 5 April 2011.
The most popular Lingua modules are seem to be the ones that convert numbers into words. These kind of modules exist for a lot of languages. However, there is no standard interface defined for them. Most of the modules' interfaces are completely different and some do not implement the ordinal conversion at all. Lingua::Any::Numbers tries to create a common interface to call these different modules. And if a module has a known interface, but does not implement the required function/method then the number itself is returned instead of dying. It is also possible to take advantage of the automatic locale detection if you install all the supported modules listed in the "SEE ALSO" section.
Task::Lingua::Any::Numbers can be installed to get all the available modules related to Lingua::Any::Numbers on CPAN.

All functions and aliases can be imported individually, but there are some pre-defined import tags:
:all Import everything (including aliases) :standard available(), to_string(), to_ordinal(). :std Alias to :standard :standard2 available_languages(), to_string(), to_ordinal() :std2 Alias to :standard2 :long available_languages(), number_to_string(), number_to_ordinal()

Some parameters enable/disable module features. + is prefixed to enable these options. Pragmas have global effect (i.e.: not lexical), they can not be disabled afterwards.
Use the language from system locale:
use Lingua::Any::Numbers qw(:std +locale); print to_string(81); # will use locale
However, the second parameter to the functions take precedence. If the language parameter is used, locale pragma will be discarded.
Install all the Lingua::*::Numbers modules to take advantage of the locale pragma.
It is also possible to enable locale usage through the functions. See "FUNCTIONS".
locale is implemented with I18N::LangTags::Detect.

All language parameters (LANG) have a default value: EN. If it is set to LOCALE, then the language from the system locale will be used (if available).
Aliases:
Aliases:
Returns a list of available language ids.
Aliases:
Returns the name of the language handler class if you pass a language id and a class for that language id is loaded. Returns undef otherwise.
This function can not be imported. Use a fully qualified name to call:
my $sv = language_handler('SV');

If you define a sub named Lingua::Any::Numbers::SILENT and return a true value from that, then the module will not generate any warnings when it faces some recoverable errors.
Lingua::Any::Numbers::SILENT is not defined by default.

UTF8, while others return arbitrary encodings. ascii is ok, but others will be problematic. A future release can convert all to UTF8.Lingua::EN::Numbers) is required by Lingua::Any::Numbers, so you'll need to install the other modules manually.
Lingua::AF::Numbers Lingua::BG::Numbers Lingua::EN::Numbers Lingua::EU::Numbers Lingua::FR::Numbers Lingua::HU::Numbers Lingua::IT::Numbers Lingua::JA::Numbers Lingua::NL::Numbers Lingua::PL::Numbers Lingua::SV::Numbers Lingua::TR::Numbers Lingua::ZH::Numbers Lingua::CS::Num2Word Lingua::DE::Num2Word Lingua::ES::Numeros Lingua::ID::Nums2Words Lingua::NO::Num2Word Lingua::PT::Nums2Word
You can just install Task::Lingua::Any::Numbers to get all modules above.
Some modules on CPAN suggest to convert numbers into words by their names, but they do something different instead. Here is a list of the bogus modules:
Lingua::FA::Number

All bug reports and wishlist items must be reported via the CPAN RT system. It is accessible at http://rt.cpan.org/NoAuth/Bugs.html?Dist=Lingua-Any-Numbers.
CPAN::Forum is a place for discussing CPAN modules. It also has a Lingua::Any::Numbers section at http://www.cpanforum.com/dist/Lingua-Any-Numbers.
If you like or hate or have some suggestions about Lingua::Any::Numbers, you can comment/rate the distribution via the CPAN Ratings system: http://cpanratings.perl.org/dist/Lingua-Any-Numbers.