Try OpenEdge Now
skip to main content
Internationalizing Applications
Preparing the Code : Data-processing issues : Currencies
 

Currencies

If you are designing a single application that receives currency data from different countries, you will have to develop a standardized mechanism for handling conversions. When your application manipulates currency data, it must handle:
*Currency symbols—length and placement
*Decimal and thousands separators
*Notation for negative numbers
Do not hard code your application to expect currency symbols in a specific position, as the length and position of currency symbols vary. When displaying currency, do not allow only one or two spaces for the currency symbol. Some currency symbols are six characters long, such as CFA Fr, used by a group of African nations. Also, remember that some currencies commonly have values in the millions (such as the Italian Lire) and require more display space.
For an application where the user works with various currencies, consider using combinations of widgets or parameters that allow the user to specify a currency. For example, use a fill-in field with a combo box to allow the user to fill in an amount and select the currency type. Separating the currency data into two components—amount and type—makes it simpler to process.
The notation for negative numbers also varies from locale to locale. Negative numbers can be indicated by a minus sign (-50), parentheses ( ( 50) ), or an abbreviation, such as DB (DB50). Your application should be able to process negative numbers, regardless of the format that users follow for input.