A resource bundle is a
Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
.properties
.properties is a file extension for files mainly used in Java-related technologies to store the configurable parameters of an application. They can also be used for storing strings for Internationalization and localization; these are known as P ...
file that contains
locale-specific data. It is a way of internationalising a Java application by making the code locale-independent.
Benefits of using resource bundles
Extracting locale-sensitive objects such as strings from the code (as opposed to
hard-coding them) means that the application can handle multiple locales without having to write different code for each locale. It also means that translators can deal with just the translatable text and not the programming code. Therefore, using resource bundles improves the
internationalisation
In economics, internationalization or internationalisation is the process of increasing involvement of enterprises in international markets, although there is no agreed definition of internationalization. Internationalization is a crucial strateg ...
and the
localisation process of a software product.
Translating a resource bundle
Some
CAT tools like
OmegaT
OmegaT is a computer-assisted translation tool written in the Java programming language. It is free software originally developed by Keith Godfrey in 2000, and is currently developed by a team led by Aaron Madlon-Kay.
OmegaT is intended for profe ...
, OmegaT+,
Swordfish
Swordfish (''Xiphias gladius''), also known as broadbills in some countries, are large, highly migratory predatory fish characterized by a long, flat, pointed bill. They are a popular sport fish of the billfish category, though elusive. Swordfis ...
or Sun's
Open language tools can specifically handle resource bundles. In addition to these, translators can use any
text editor
A text editor is a type of computer program that edits plain text. Such programs are sometimes known as "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be us ...
to create new resource bundles or to modify existing ones.
Tools to create resource bundles
Th
Message Compiler
/ref> is a tool to generate resource bundle files from a single source file containing localized text definitions in different languages. The Message Compiler creates also constant definitions for the keys used to access the localized texts with the methods of the Java
Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
clas
ResourceBundle (6)
and HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
documentation pages for each language.
See also
* Bundled software
References
{{DEFAULTSORT:Java Resource Bundle
Java (programming language)