Is there a ready-made solution for converting digital monetary representation into string for different currencies in Russian?
123.4 = one hundred twenty three rubles 40 kopecks
123.4 = one hundred twenty three euros 40 euro cents
123.4 = one hundred twenty three dollars and 40 cents
123.4 = one hundred twenty-three francs and 40 sous
And also for other currencies.
I would be glad for any help!
There is a ready-made library for converting an amount into a string moneytostr-russian .
<dependency> <groupId>com.github.javadev</groupId> <artifactId>moneytostr</artifactId> <version>1.17</version> </dependency>
MoneyToStr moneyToStr = new MoneyToStr(MoneyToStr.Currency.RUR, MoneyToStr.Language.RUS, MoneyToStr.Pennies.NUMBER); moneyToStr.convert(123.4D) // сто двадцать три рубля 40 копеек