Locale class is used to represent a part of the world. Associated with a locale is a set of conventions concerned with such activities as controlling the way currency or dates are displayed. The use of locales aids in the internationalization of an application. The developer specifies the locale and then uses the locale in various parts of the application.
In addition to the
Locale class, we can also use resource bundles. They provide a way to customize the appearance based on the locale for data types other than numbers and dates. It is particularly useful when working with strings that change based on the locale.
For example, a GUI application will have different visual components whose text should differ ...