Skip to content

NumbersToLetters is a package that converts numbers to letters in multiple languages.

License

Notifications You must be signed in to change notification settings

Wilfried-Tech/numbers_to_letters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

numbers_to_letters

Pub Version GitHub GitHub stars GitHub forks

NumbersToLetters is a package that converts numbers to letters in multiple languages.

🛠️ Features

  • Convert numbers to letters in multiple languages.
  • Developers can add their own languages.

👨‍💻 Getting started

To use this package, add numbers_to_letters as a dependency in your pubspec.yaml file.

dependencies:
  numbers_to_letters: ^1.0.0

📝 Usage

This is a simple usage example:

import 'package:numbers_to_letters/numbers_to_letters.dart';

void main() {
  print(NumbersToLetters.toLetters('en', 1234)); // one thousand two hundred and thirty-four
}

you can change the word separator with separator setter

...
NumbersToLetters.separator = ' ';
...

Developers can add their own languages by extending the NumbersToLettersBase class.

class NumbersToLettersCustom extends NumbersToLettersBase {
    ...
}

void main() {
    NumbersToLetters.registerLanguage('custom', NumbersToLettersCustom());
    ...
    print(NumbersToLetters.toLetters('custom', 1234));
}

Supported languages

  • English
  • French
  • Spanish
  • German

🤗 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Request a new language by creating a new class that extends NumbersToLettersBase, write correponding tests and open a pull request. Then, add the language to the README.

I will be happy to merge it. add it to the package.

❤️ Donation

If this project help you reduce time to develop, you can give me a cup of coffee :) by give me a star.

About

NumbersToLetters is a package that converts numbers to letters in multiple languages.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages