Lingua::TR::Numbers
version 0.35
use Lingua::TR::Numbers qw(num2tr num2tr_ordinal); my $x = 234; my $y = 54; print "Bugün yapman gereken ", num2tr($x), " tane işin var!\n"; print "Yarın annemin ", num2tr_ordinal($y), " yaşgününü kutlayacağız.\n";
prints:
Bugün yapman gereken iki yüz otuz dört tane işin var! Yarın annemin elli dördüncü yaşgününü kutlayacağız.
Lingua::TR::Numbers turns numbers into Turkish text. It exports (upon request) two functions, num2tr and num2tr_ordinal. Each takes a scalar value and returns a scalar value. The return value is the Turkish text expressing that number; or if what you provided wasn't a number, then they return undef.
num2tr
num2tr_ordinal
This module can handle integers like "12" or "-3" and real numbers like "53.19".
This module also understands exponential notation -- it turns "4E9" into "dört çarpı 10 üzeri dokuz"). And it even turns "INF", "-INF", "NaN" into "sonsuz", "eksi sonsuz" and "sayı-değil" respectively.
Any commas in the input numbers are ignored.
Lingua::TR::Numbers - Converts numbers into Turkish text.
You can import these one by one or use the special :all tag:
:all
use Lingua::TR::Numbers qw(num2tr num2tr_ordinal);
or
use Lingua::TR::Numbers qw(:all);
Converts the supplied number into Turkish text.
Similar to num2tr, but returns ordinal versions .
Define Lingua::TR::Numbers::DEBUG to enable debugging.
Lingua::TR::Numbers::DEBUG
This module supports any numbers upto 999 decillion (999*10**33). Any further range is currently not in commnon use and is not implemented.
Lingua::EN::Numbers. http://www.radikal.com.tr/haber.php?haberno=66427 http://en.wikipedia.org/wiki/Names_of_large_numbers.
See NumbersTR.pod (bundled with this distribution) for the Turkish translation of this documentation.
NumbersTR.pod
This module' s source file is UTF-8 encoded (without a BOM) and it returns UTF-8 values whenever possible.
Currently, the module won't work with any Perl older than 5.6.
This module is based on and includes modified code portions from Sean M. Burke's Lingua::EN::Numbers.
Lingua::EN::Numbers is Copyright (c) 2005, Sean M. Burke.
Burak Gursoy <burak@cpan.org>
This software is copyright (c) 2006 by Burak Gursoy.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lingua::TR::Numbers, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::TR::Numbers
CPAN shell
perl -MCPAN -e shell install Lingua::TR::Numbers
For more information on module installation, please visit the detailed CPAN module installation guide.