Indian.dll control is a control for applications which need the data to be formated in Indian formats/national language (Hindi). It's very useful if you are working with windows (which still does not support Indian formats). This will format the data (numbers) in Indian comma style (eg. 9,999/-), Indian words in English as well as Hindi(eg. one lac only) and formats the date independent of system settings to dd-MM-yyyy (not for display, but storage and calculations). Furthermore, it displays the numbers with the new currency symbol for the rupee.
This program is also useful if you have data in Indian format, to be converted in to integer
Using the Code
To use this control, reference the control and start formatting the data, to suit your needs.
To convert data in Indian format to integer
int i=Indian.IndianCurrency.getVal("Rs. 99,999/-");
To convert date from system format to Indian format
int i=Indian.IndianDate.date("1/2/3", "MM/dd/yyyy");
To create a new translation in the XML file.
< Section Name="Marathi" > ... < / section >
< Key Name="Rupees" Value="रुपये" / >
Download a sample program to play with it, you will see some more examples there to reach all results as shown in images above.
Points of Interest
I was baffled when I used to get different results of my invoice program from the same data. This was, since all the storage was made in system format. Since then I learnt that one must follow a rule to save date (at least) in a particular format itself. After using it in several programs, I learnt it to be very useful for many programers and hence I decided to write this article.
On this page apart from the images I have not used rupee symbol due to font unavailability on all systems but program would work across all systems.
You may and you may not use the font provided to display the rupee symbol. Since this is a unicode character you will be able to see it on all fonts with the available graph for the symbol.
This program is free to use and without source. You may wish to drop me a line of where it is being used.
- No source for you to edit.
Version 1.6.0: First public posting.
Version 1.7.5: Few enhancements and fixes, decimal included.
Version 1.8.0: Few enhancements and fixes.
Version 2.0.0: Few enhancements and fixes. Included Marathi ("mr") as a langauge & added support for new rupee symbol. Thanks to Shri Javed Patel for Marathi translation.
Version 2.1.0: Many fixes and a few enhancements. A nearly new written code.
Version 2.5.0: Support for translation file. Now support for any language can be added by user by editing the translation file.
Version 3.0.0: Few enhancements and fixes. "Marathi" language is moved out to translation file.
Contents of Download
- The solution built in VC# Express 2010
- The usable files in your program:
- No Plans to update this program further until I get a really new idea haunts my mind.
I am a computer engineer doing business at my city. I love to program is also engaged in part time programing. Normaly, work for fun and most of the time free of charge.