Skip to content

Commit

Permalink
Merge pull request #7 from polishlang/add-polish-support
Browse files Browse the repository at this point in the history
Add polish support
  • Loading branch information
rmunate authored Aug 22, 2023
2 parents a44f7a9 + 534f1be commit 28b2c3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 ⚙️

Expand Down Expand Up @@ -47,6 +47,7 @@ SpellNumber::getAllLocales();
// 5 => "ro" (Romanian)
// 6 => "fa" (Farsi)
// 7 => "hi" (India)
// 8 => "pl" (Polish)
// ]
```

Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Langs/Langs.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ final class Langs
'ro', // Romanian from Romania
'fa', // Farsi from Iran
'hi', // Hindi from India
'pl', // Polish from Poland
];

/**
Expand All @@ -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"
];

/**
Expand Down

0 comments on commit 28b2c3a

Please sign in to comment.