All of the methods and libraries assume regular grouping, but India's money is grouped irregularly. While regular money is counted in groups of 10^3 (thousands, millions, billions, trillions), in India there's a 3,2,2 cycle. One lakhs = 100,000 and 1 crore is 100 lakhs, but if you had 1000 of them it would still be a thousand.
Everybody seems to get this wrong, even Google Sheets.
I’m not seeing support for irregular cycles - in all these libs you can customise the 10^3 separator and the decimal mark, but the problem in India is that the separators follow a 10^3,10^2,10^2 repeating separator cycle.
Ah, thanks. Never thought of searching for "south asian". Let me see if that covers all the cases, will either deprecate or use the Money gem internally.
This can be done with Rails's number_to_currency helper: https://apidock.com/rails/ActionView/Helpers/NumberHelper/nu...
# Paisa.words
There is number_to_human which is close: https://api.rubyonrails.org/classes/ActionView/Helpers/Numbe..., otherwise number_to_words's gem https://github.com/kslazarev/numbers_and_words
I would actually recommend using the money gem to handle money objects: https://github.com/RubyMoney/money
Everybody seems to get this wrong, even Google Sheets.