Defining your own locales

It is up to you how you use the user-defined variant component of the locale identifier. You might record voice segments for an application using different voices: male and female, for example. You would identify these voice segments as, for example, en_US_MALE, en_US_FEMALE).

You might have a different greeting at the beginning of an application, depending on which branch of your company the call is for, even though the logic of the application is the same for all branches. To achieve this, invent a locale identifier for each branch (for example, en_US_CHICAGO, en_US_WASHINGTO, en_US_NEWYORK). Then name each greeting voice segment using the appropriate locale identifier, and use different default locales, in one of the ways described in Internationalization, to run instances of the application for each branch. The other voice segments in the application, common to all branches, should be in the base locale (en_US).

Whenever a voice segment for a specific variant cannot be found, a voice segment for the country or region and language is searched for.

Specifying PREEURO support with existing 3–part locales

As a result of Euro support, five languages (French, Castilian Spanish, Catalan, German, and Italian) default to saying Euro rather than the national currency in both new and existing applications. In two–part locales (for example, fr_FR), you can override this by specifying a variant of PREEURO (for example, fr_FR_PREEURO) in the locale option of the AudioCurrency object (see Developing Java applications). However, if you have defined your own locales with three parts (for example, fr_FR_PARIS), and want to use preeuro support, you can do this only by specifying dtj.preeuro.support = true in the dtj.ini file.