Skip to content

Commit

Permalink
Adjust Output
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunate authored and rmunate committed Nov 20, 2023
1 parent 988503e commit 20a4e4d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

Easily convert numbers to words in Laravel using this library, which leverages the native `PHP INTL` extension to perform conversion effortlessly. With this library, you can convert numbers to words in various languages and also obtain the value in currency format according to the selected language. Supported languages include English, Spanish, Portuguese, French, Italian, Romanian, Hindi, Polish and Persian (Farsi).
Easily convert numbers to words in Laravel using this library, which leverages the native `PHP INTL` extension to perform conversion effortlessly. With this library, you can convert numbers to words in various languages and also obtain the value in currency format according to the selected language. Supported languages include English, Spanish, Portuguese, French, Italian, Romanian, Hindi, Polish, Vietnamese and Persian (Farsi).

**This library is compatible with PHP +8.0 and Laravel versions 8.0 and higher**

Expand Down Expand Up @@ -49,6 +49,7 @@ To whom we thank for supporting making programming easier.
- [Gabriel Rausch](https://github.com/gdsrmygdsrjr) (Zero Decimal Correction)
- [Alejandro Diaz](https://github.com/alejandrodiazpinilla) (Readme And Icon)
- [Frank Sepulveda](https://github.com/socieboy) (Ordinal Texts)
- [Ngô Quốc Đạt](https://github.com/datlechin) (Vietnamese Language)

## License
This project is under the [MIT License](https://choosealicense.com/licenses/mit/).
Expand Down
22 changes: 21 additions & 1 deletion docs/getting-started/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,24 @@ outline: deep

### Changed

- **TitleCase to LowerCase**: In response to specific language nuances, output is now in lowercase. Developers have the option to modify the output as needed, keeping in mind the use of the callback function.
- **TitleCase to LowerCase**: In response to specific language nuances, output is now in lowercase. Developers have the option to modify the output as needed, keeping in mind the use of the callback function.

To swiftly revert to title-formatted output, simply publish the configuration file:

```bash
php artisan vendor:publish --provider="Rmunate\\Utilities\\Providers\\SpellNumberProvider" --tag="config"
```

Then, locate the callback function and adjust the return statement in the configuration file:

```php
return [
//...
'callback_output' => function ($data) {

// Your logic here...

return \Illuminate\Support\Str::title($data->getWords());
},
]
```

0 comments on commit 20a4e4d

Please sign in to comment.