|
|
|||
|
||||
IntroductionThis project aims to provide an easy to use yet powerful JavaTM internationalization facade with a pluggable resource lookup and loading mechanism. The reason to support a pluggable localization framework is to make internationalization independent of the actual format and whereabouts of the localization resources and to allow to plug in the desired localization framework at deploy time. |
Features
|
Sample codeTypical use of the sji18n api is illustrated in the following example:
package some.pckg;
import sji18n.I18n;
public class SomeClass {
private static final Logger LOGGER = Logger.getLogger("some.pckg.SomeClass");
private static final I18n I18N = new I18n("SomeResource");
public void someMethod() {
...
try {
showUserMessageWithIcon(new ImageIcon(I18N.getImage("someImage")),
I18N.getMessage("someMessage", var1, var2));
...
LOGGER.log(Level.INFO, I18N.getLogMessage("onSomeSuccess", var3));
} catch (Exception e) {
LOGGER.log(Level.WARNING, I18N.getLogString("onSomeError"), e);
}
}
}
|
Implementation notessji18n defines an Setting system property Requires at least java 1.6 and a L10nResourceFactory implementations |