Java resource bundle
Computer language data file
title: "Java resource bundle" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["java-(programming-language)"] description: "Computer language data file" topic_path: "general/java-programming-language" source: "https://en.wikipedia.org/wiki/Java_resource_bundle" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Computer language data file ::
A resource bundle is a Java .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 and the localisation process of a software product.
Translating a resource bundle
Some CAT tools like OmegaT, OmegaT+, Swordfish or Sun's Open language tools can specifically handle resource bundles. In addition to these, translators can use any text editor to create new resource bundles or to modify existing ones.
Tools to create resource bundles
The Message Compiler 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 class ResourceBundle (6), ResourceBundle (7) and HTML documentation pages for each language.
References
References
- O'Conner, John. "Java Internationalization: Localization with ResourceBundles".
- [https://omegatplus.sourceforge.net/ OmegaT+]
- [http://www.tmasoft.de/MessageCompiler/index.html Message Compiler]
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::