Translation - Development Information
Internationalization
imjslideshow is written in Java
and uses the internationalization capabilities of Java.
All text are generated with java.util.ResourceBundle.
If formatting is needed, then java.text.MessageFormat is used.
Localization
A resource-bundle is created for every package
with at least one class, that needs localization.
The RessourceBundles for imjslideshow
are located in the folder net/sourceforge/imjSlideshow/l10n.
The name of the resource-bundle is the package-name
without the leading net.sourceforge.imjSlideshow,
with an underscore in place of dots
and with the extension "properties".
Example: Classes in the package "net.sourceforge.imjslideshow.ui.dnd" uses the resource-bundle "ui_dnd.properties"
in the folder "net/sourceforge/imjslideshow/l10n".
The name of an item within the resource-bundle is derived from the name of the class.
Example: "SlideshowException.Title" in base.properties is used in the class net.sourceforge.imjSlideshow.base.SlideshowException.
Properties-files for a country or language
For a given country or language all properties-files must be copied
and named according the naming-convention of resource-bundles
with the country-code and if needed with the language-code.
Example: The resource-bundle ui_dnd.properties for german is ui_dnd_de.properties.
For details look at the java documentation.
Special Feature
Mnemonic
The mnemonic-key of an action must not be set in a separate text.
It can be signaled with a "&" in the name of the action.
This is used in the action-texts in ui.properties.
Example: "SlideshowV.File.New.Name=&new Slideshow"
defines "n" as the mnemonic-key of the new-action of the slideshow in the English localization.
Accelerator
"shift", "alt", "meta" and "alt graph" can be used to define the
accelerator-key of an action.
This is used in the action-texts in ui.properties.
Example: "SlideshowV.File.New.Accelerator=n shift alt"
defines the "n"-key with hold down the "shift"- and "alt"-key
as the accelerator-key of the new-action of the slideshow in the English localization.