Hi,
Code snippet to explain the example.
String language = "en";
String country = "US";
Locale currentLocale;
java.util.ResourceBundle messages;
currentLocale = new Locale(language, country);
messages = ResourceBundle.getBundle("MessagesBundle", currentLocale);
System.out.println(messages.getString("greetings"));
System.out.println(messages.getString("inquiry"));
System.out.println(messages.getString("farewell"));
MessageBundle.properties
========================
greetings = Hello.
farewell = Goodbye.
inquiry = How are you?
Depending on the MessageBundle properties file, the output will vary. Now its upto u to code to retrieve the MessageBundle.properties file.
Rgds,
Seetesh