NumToText icon indicating copy to clipboard operation
NumToText copied to clipboard

Converts numbers to text representation in English, Latvian or Russian. Other languages may be added just by extending class.

Results NumToText issues
Sort by recently updated
recently updated
newest added

In russian language letters at the end of the last digit depend on the gender, ex: од**ин** рубль but од**на** копейка. ``` $price = Price::toText(1.01, [['рублей', 'рубль', 'рубля'], ['копеек', 'копейка',...

Hello @ivanovsaleksejs, I'd like to add PSR-4 support for this repo that I can include it via Composer to my project. I wonder if I can propose a pull request?

Piemēram, ``` PriceToText(8.70, $currencies['LV']['LVL'], 'LV', false, true) ``` Atgriež: **"astoņi lati sešdesmit deviņi santīmi"** ``` PriceToText(69.60, $currencies['LV']['LVL'], 'LV', true, true) ``` Atgriež: **"sešdesmit deviņi lati 59 santīmi"** ## Man palīdzēja:...

Negatīvās cenās centu daļa (frtakcija) ir kā (1 - centi), piemēram: ``` PriceToText(-0.4): "mīnus nulle lati sešdesmit santīmi" PriceToText(-3.77): mīnus trīs lati divdesmit trīs santīmi ```

Lv valodā, ja skaitlis beidzas ar "1", tad vārds ir jābūt vienskaitlī.

``` $amount = 112231.45; $language = 'lv'; $beforeDecimal = 'lati'; $afterDecimal = 'santīmi'; echo numbers2words::convert($amount, $language, $beforeDecimal, $afterDecimal); ``` Rezultāts ir: simts {self::[lv]} tūkstoši divsimt trīsdesmit viens lati un 45...