I'm developing an accounting system using django. As you know there's some operations that require a amount field displaying the money in text format. Something like:

  • 50 = fifty dollars
  • 250 = two hundred with fifty dollars

And so on...

I've found the django.contrib.humanize module can help me, but only for money in english language (USD), so is there an django application or snniped code to archive that?

Also, I am using django-money. So if your suggestion work with that, it would be great!

Any suggestions are welcome!

EDIT

I want this result number (currency) into english words, but for django.

有帮助吗?

解决方案

Try using the num2words module. It supports multiple languages too.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top