checking while retrieving data in a static class

I have a static class which stores some system messages,

normally i'll call it by using:

if(success)

System.out.println(MyMessage.message01);

else

System.out.println(MyMessage.message02);

now my system want to support two languages, english and japanese

what should i do by not touching the calling method (like the example above), and do checking at the MyMessage static class?

if it wasnt a static class i think it can be easily solved by doing a checking at class construct....

any idea? thanks a lot

[569 byte] By [desmondtancka] at [2007-11-27 4:37:48]
# 1

Are you familiar with resource bundles? You could load from one in a static initializer:

public class Messages {

static {

initialize "constants" from resource bundle

}

public static final String SUCCESS;

...

}

Hippolytea at 2007-7-12 9:48:08 > top of Java-index,Java Essentials,Java Programming...