Development
Design
Testing
Internationalisation of Messages

The DataNucleus system is internationalisable hence messages (to log files or exceptions) can be displayed in multiple languages. Currently DataNucleus contains localisation files in the default locale (English), but can be extended easily by adding localisationfiles in languages such as Spanish, French, etc. The internationalisation operates around the org.jpox.util.Localiser class that is responsible for generating the messages in the specified locale. Each class needs to instantiate a Localiser

private static final Localiser LOCALISER=Localiser.getInstance("org.datanucleus.store.Localisation",
                    MyClass.class);
and then output messages via
LOCALISER.msg("StoreManager.SchemaDataInitialise", schemaName, autoStartMechanism)
The messages themselves are contained in a file for each package. For example, with the above example, we have org.datanucleus.store.Localisation.properties. This contains entries such as
StoreManager.SchemaDataInitialise=Initialising Schema "{0}" using "{1}" auto-start option
So the 2 parameters specified in the LOCALISER.msg call are inserted into the message. The language-specific parts are always contained in the Localisation.properties file. To extend the current system to internationalise in, for example, Spanish you would add a file org.datanucleus.store.Localisation_es.properties and add an entry such as
StoreManager.SchemaDataInitialise=Inicializando la esquema "{0}" con la opción de empezar "{1}"
With this file installed, anybody running an application where the JDK is running in Spanish as default locale would see the above Spanish message. It is intended to include such files in a future release.

Further references: International Components for Unicode for Java