Download the PHP package putheakhem/khmer-number-to-text without Composer
On this page you can find all versions of the php package putheakhem/khmer-number-to-text. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download putheakhem/khmer-number-to-text
More information about putheakhem/khmer-number-to-text
Files in putheakhem/khmer-number-to-text
Package khmer-number-to-text
Short Description Convert Khmer numbers to Khmer text representation
License MIT
Informations about the package khmer-number-to-text
Khmer Number To Text
Convert Arabic or Khmer digit numbers into Khmer written text format (spoken form), suitable for invoices, financial documents, education, and legal reporting in the Khmer language.
π¦ Installation
For local development, use a path-based repository in your Laravel project.
π Features
- β
Supports both Arabic (
1234) and Khmer (α‘α’α£α€) digit inputs - β
Outputs proper Khmer number words (e.g.,
1234 β αα½αααΆααααΈαααααΆααα·αααααΆααα½α) -
β Proper handling of:
- Single digits (
6 β ααααΆααα½α) - Tens (
40 β αααα·α) - Hundreds, Thousands, Millions (
1234567 β αα½αααΆαααΈαααααΆααα·αααααΆααα½α)
- Single digits (
- β
Laravel Facade support:
KhmerNumber::toText(1234)
π§ Usage
Basic Example
Helper
If you prefer, you can use the global helper function:
π Internals
This package relies on:
-
KhmerNumberConstantsβ a centralized definition of:- Khmer digit word mappings
- Tens word patterns (e.g.,
60 β α α»ααα·α) - Large unit labels (
ααΆα,ααΆαα,αα)
- Recursive
convertNumber()logic to handle number decomposition - Laravel Facade binding via
KhmerNumber
π οΈ Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/YourFeature) - Make your changes
- Commit your changes (
git commit -m 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Create a new Pull Request
- Ensure your code adheres to the coding standards and passes all tests
Security Vulnerabilities
If you discover a security vulnerability within this package, please send an e-mail to puthea.khem at gmail.com. All security vulnerabilities will be promptly addressed.
Support Me
If you find this package useful, consider supporting my work:
π License
The MIT License (MIT). Please see License File for more information.
Built with β€οΈ by Puthea khem