Resource Bundles allows you to create localized multi language supported applications for each locale. The abstract class “java.util.ResourceBundle” offers such locale-specific resources. The abstract class is sub classed by “PropertyResourceBundle” and “ListResourceBundle”. Each of these classes have their own implementations in a application which I’ll show some examples how to.
However, there are some important facts that I’d like to point; first of all if you attempt to import a resource bundle that does not exist, then the JVM will throw a runtime exception “MissingResourceException”. Second of all the resource bundle seeks an order of a Locale for a file naming format as follows;
Source Code: https://github.com/tugrulaslan/JavaI18NDemo