diff --git a/README.md b/README.md index abe9ab3..6129a95 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Convert Numbers to Words in Laravel -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 and with the contribution of [Siros Fakhri](https://github.com/sirosfakhri), Persian (Farsi) support has been added. +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 with the contribution of [Siros Fakhri](https://github.com/sirosfakhri), Persian (Farsi) support has been added. ⚙️ This library is compatible with Laravel versions 8.0 and higher ⚙️ @@ -47,6 +47,7 @@ SpellNumber::getAllLocales(); // 5 => "ro" (Romanian) // 6 => "fa" (Farsi) // 7 => "hi" (India) +// 8 => "pl" (Polish) // ] ``` @@ -99,6 +100,9 @@ SpellNumber::value(100.12)->locale('hi')->currency('रूपये')->fraction( SpellNumber::value(100)->locale('hi')->currency('रूपये')->toMoney(); // "एक सौ रूपये" + +SpellNumber::value(100.65)->locale('pl')->currency('złotych')->fraction('groszy')->toMoney; +// "Sto Złotych I Sześćdziesiąt Pięć Groszy" ``` #### Other Initializer Methods diff --git a/src/Langs/Langs.php b/src/Langs/Langs.php index c3dbeb5..96b040b 100644 --- a/src/Langs/Langs.php +++ b/src/Langs/Langs.php @@ -20,6 +20,7 @@ final class Langs 'ro', // Romanian from Romania 'fa', // Farsi from Iran 'hi', // Hindi from India + 'pl', // Polish from Poland ]; /** @@ -36,6 +37,7 @@ final class Langs 'ro' => 'cu', // Romanian from Romania: "cu" 'fa' => 'ممیز', // Farsi from Iran: "ممیز" 'hi' => 'और', // Hindi from India: "और" + 'pl' => 'i', // Polish from Poland: "i" ]; /**