Notes on Deploying I18N Simulations

Our original intention had been to use the standard i18n support in Java to support this. Unfortunately, a Java program launched via Web Start cannot set the default locale unless it is a signed application. So we have to use a modified approach.

To set up a simulation, the following should be taken for every jar with localized strings. We will assume we are working with a simulation named CoolSim, and want to deploy a localized version for a language whose normal key is _cs.

  1. Do not put the properties files with default localized strings in the simulation's jar file. This also applies to any properties files for support jars.
  2. Make a copy of every localized property file, and give the copy the name of the default file. E.g., Make a copy of CoolSim_cs.properties, and give it the name CoolSim.properties.
  3. Put the new CoolSim.properties in a directory named localization, and create a jar file named CoolSim-cs.jar. Create the jar file in such a way that CoolSim.properties shows up inside the jar file with the following path: localization/CoolSim.properties.
  4. Put a line in the resources section of the JNLP file for each of the properties files.