The AudioCurrency class

Use the AudioCurrency class to represent a monetary value. The AudioCurrency class is a subclass of AudioNumber, and so inherits the setValue() and getValue() methods. In addition to the value property, which represents the amount, an AudioCurrency object has a country property which is used as an indirect representation of the monetary unit of the currency. For example, if 'US' is specified, the monetary units will be dollars and cents. If not specified, the country property is obtained from the current locale of the application at runtime.

The style property inherited from the superclass MediaType has only one value for AudioCurrency. This default style takes a real number and speaks it as follows: the first part of the number is spoken using the Integer style of the AudioNumber class, followed by the major currency voice segment for the locale. The second part of the real number, up to 2 decimal places, is then spoken also using the Integer style, followed by the minor currency voice segment for the locale. For example, 2.22 in the en_US locale is spoken as "two dollars twenty two cents".

In the following locales, currency amounts are spoken in euros and cents by default: French, Castilian Spanish, Catalan, German and Italian. To revert to the old national currency, specify PREEURO in the variant part of the locale property of the AudioCurrency object. For example, to use the French franc in place of the euro, specify fr_FR_PREEURO as the locale. Alternatively, you can specify dtj.preeuro.support=true in the dtj.ini file to achieve the same result.

Note that 1 billion is used to mean 1 thousand million in both the en_US and en_GB locales.

The constructor methods for this class are:
AudioCurrency()
Constructs an audio currency object with a value of zero and the single default style. The country property is taken from the current locale of the application at runtime. You can set these properties later using the methods setValue() and setCountry().
AudioCurrency(double value)
Constructs an audio currency object with specified value and the single default style. The monetary unit of this currency is taken from the current locale of the application at runtime.
AudioCurrency(double value, Country currency)
Constructs an audio currency object with specified value and currency.
For example:
public class InApp extends WVRApplication {
  // Create a Country object to represent the monetary units
  Country unitedStates = new Country("US");
	
  // Create an audio currency
  public AudioCurrency orderCost = new AudioCurrency(86.32, unitedStates);
  .
  .
  .
}