PHP Classes

Extenso PT: Spell Euro currency amounts in Portuguese

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 60 All time: 10,494 This week: 455Up
Version License PHP version Categories
extenso-pt 1.0GNU Lesser Genera...5.0PHP 5, Text processing, Finances
Description 

Author

This package is specific mainly for applications used in Portugal Portugal .

This class can spell Euro currency amounts in Portuguese.

It can take a given amount in Euros and convert it to European Portuguese words to spell the amount.

The class supports amounts up to billions and can have cents.

The code and comments are in Portuguese. In Portuguese:

Esta classe serve para criar o extenso de montantes em euros em Português Europeu.

Picture of Romeu Gamelas
Name: Romeu Gamelas <contact>
Classes: 3 packages by
Country: Portugal Portugal
Age: ???
All time rank: 248735 in Portugal Portugal
Week rank: 195 Up2 in Portugal Portugal Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php
if(isset($_POST['v'])){
    require(
"extenso-pt.php");
   
$extenso = new extenso();
}
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>Teste para a classe de extenso</title>
    </head>
    <body>
<form method="post" action="test.php">
<input type="text" name="v" value="<?php echo isset($_POST['v']) ? $_POST['v'] : '';?>" />
<input type="submit" value="Extenso" />
</form>
<?php
   
if(isset($extenso)){
?>
<p><?php echo $extenso->calcular_extenso($_POST['v']);?></p>
  <p><?php echo mb_strtoupper($extenso->calcular_extenso($_POST['v']), "UTF-8");?></p>
  <p><?php echo ucwords($extenso->calcular_extenso($_POST['v']));?></p>
<?php
   
}
?>
</body>
</html>


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file exemplo.php Example Exemplo de uso
Plain text file extenso-pt.php Class Main class

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 Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:60
This week:0
All time:10,494
This week:455Up