HOME

TheInfoList



OR:

A resource bundle is a
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
.properties 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 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 strategy not only for ...
and the localisation process of a software product.


Translating a resource bundle

Some
CAT The cat (''Felis catus''), also referred to as the domestic cat or house cat, is a small domesticated carnivorous mammal. It is the only domesticated species of the family Felidae. Advances in archaeology and genetics have shown that the ...
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 prof ...
, OmegaT+,
Swordfish The swordfish (''Xiphias gladius''), also known as the broadbill in some countries, are large, highly migratory predatory fish characterized by a long, flat, pointed bill. They are the sole member of the Family (biology), family Xiphiidae. They ...
or Sun's
Open language tools Open Language Tools is a Java project released by Sun Microsystems under the terms of Sun's CDDL (a GPL-incompatible free software license).
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. An example of such program is "notepad" software (e.g. Windows Notepad). Text editors are provided with operating systems and software development packages, and can be used to c ...
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 is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
clas
ResourceBundle (6)
and
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
documentation pages for each language.


See also

*
Bundled software In marketing, product bundling is offering several products or services for sale as one combined product or service package. It is a common feature in many imperfectly competitive product and service markets. Industries engaged in the practice ...


References

{{DEFAULTSORT:Java Resource Bundle Java (programming language)