moul / number-to-words

convert number into words (english, french, italian, roman, spanish, portuguese, belgium, dutch, swedish, polish, russian, iranian, roman, aegean)
https://manfed.life/number-to-words
Apache License 2.0
85 stars 25 forks source link

Add `en-gb` support #159

Open taylow opened 2 years ago

taylow commented 2 years ago

I implemented en-gb, which includes the word and between each mega, and commas to separate the megas.

I wasn't sure what to do about the en alias, so any input would be great.

Examples:

1174315110:    "one billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and ten"
1174315119:    "one billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and nineteen"
15174315119:   "fifteen billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and nineteen"
35174315119:   "thirty-five billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and nineteen"
935174315119:  "nine hundred and thirty-five billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and nineteen"
2935174315119: "two trillion, nine hundred and thirty-five billion, one hundred and seventy-four million, three hundred and fifteen thousand, one hundred and nineteen"