Search code examples
c#.netlocalizationnumbers

Is there an easy way to convert a number to Indian words format with lakhs and crores?


As the title suggests I would like to convert a long number to the format with words using C#. The Culture settings don't seem to do this and I am just currently doing this

String.Format(new CultureInfo("en-IN"), "{0:C0}", Price)

But for very long numbers I would prefer the word format. I am not from India and only vaguely familiar with how the system works.


Solution

  • While I can't give you the code itself, here's the system

    • 1 - One
    • 10 - Ten
    • 1000 - Thousand
    • 10000 - Ten Thousand
    • 100000 - Lakh
    • 1000000 - Ten Lakh
    • 10000000 - Crore
    • 100000000 - Ten Crore
    • 1000000000 - Arab
    • 10000000000 - Ten Arab
    • 100000000000 - Kharab
    • 1000000000000 - Ten Kharab
    • 10000000000000 - 1 Neel
    • 100000000000000 - 10 Neel
    • 1000000000000000 - 1 Padm

    I had written the routines for an accounting package I made, so writing it is not particularly hard.