Localization is the process of designing software so that it can be adapted (localized) to various languages and regions without engineering changes to the software. When you localize an application, you provide alternate language values for each element in your application, such as screen text, menus, and icons.
In the NetBeans IDE, you can use the New Localization Support Class wizard to create the files you need to localize an application:
.properties
)
that contains the element keys and their values. Inside the property resource
bundle, elements
are
listed
as
key/value
pairs,
for
example:
TEXT_NOT_FOUND=No text available for this locale. TEXT_HELLO=Hello, world! TEXT_WARNING=There are {0} warnings in the file {1}. BUTTON_FINISH=Finish
After you create the key/value pairs for your application, you can then
use the getMessage()
method
within your code to prove the proper value for the called key. The initialization
method is called automatically when a call to the getMessage(java.lang.String)
method
is attempted for the first time.
For example, LocalizationSupport.getMessage("TEXT_HELLO")