Skip to content

phpmike/MvNumberWordsFrConverter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mv\NumberWordsFr\Converter

Converts numbers into words in French (FR_fr) up to 999,999,999,999,999,999.

Build Status

License Build Status Latest Stable Version PHP Version Require Test Coverage Maintainability

Installation

To install this library, you can add it as a dependency to your project using Composer:

composer require mv/number-words-fr-converter

Usage

To use the library, create an instance of IntToWordsFrConverter and call the convert method:

use Mv\NumberWordsFr\Converter\IntToWordsFrConverter;

$converter = new IntToWordsFrConverter();
$result = $converter->convert(12345);

echo $result; // "douze mille trois cent quarante-cinq"

Other locales

use Mv\NumberWordsFr\Converter\IntToWordsFrBeConverter;
use Mv\NumberWordsFr\Converter\IntToWordsFrCaConverter;

$converter = new IntToWordsFrBeConverter();
$resultBe = $converter->convert(72);
$converter = new IntToWordsFrCaConverter();
$resultCa = $converter->convert(72);

echo $resultBe; // "Septante-deux"
echo $resultCa; // "Soixante-douze"

Exists with Fr, FrBe, FrCh, FrCa, FrLu, FrMa, FrTn

Methods

convert(int $int): string

Converts an integer into words.

  • $int: The integer to convert into words.

Contributing

Any contributions, suggestions, or bug reports are welcome! Here's how you can contribute:

  1. Fork the repository.
  2. Create a branch for your changes: git checkout -b feature/my-feature.
  3. Make your changes and commit: git commit -am 'Added my feature'.
  4. Push to the branch: git push origin feature/my-feature.
  5. Create a pull request to the concerned branch of the repository.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages