Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 88 | All time: 9,980 This week: 69 |
Version | License | PHP version | Categories | |||
num2txt 1.0.1 | The PHP License | 5 | PHP 5, Text processing, Math |
Description | Author | ||||||||
This package is specific mainly for applications used in Spain .
This class can convert a number to Spanish text. |
|
Two simple classes for convert a number to spanish text.
Examples:
string txt1 = Alp3476.A2Num2Txt.ToString("3528.25");
Console.WriteLine(txt1);
// tres mil quinientos veintiocho con veinticinco
string txt2 = Alp3476.A2Num2Txt.ToString(123456);
Console.WriteLine(txt2);
// ciento veintitres mil cuatrocientos cincuenta y seis
string txt3 = Alp3476.A2Num2Txt.ToString(-258241.2);
Console.WriteLine(txt3);
// menos doscientos cincuenta y ocho mil doscientos cuarenta y uno con veinte
include 'Num2Txt.php';
$o = new \Alp3476\Num2Txt();
echo $o->toString(3527.25) . PHP_EOL;
// tres mil quinientos veintisiete con veinticinco
echo $o->toString(12342245281.890) . PHP_EOL;
// doce mil trescientos cuarenta y dos millones doscientos cuarenta y cinco mil doscientos ochenta y uno con ochenta y nueve
echo $o->toString(0.253) . PHP_EOL;
// cero con veinticinco
Trim decimals to 2 digits
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
Conversión de números a texto |