Java resource bundle

From Wikipedia, the free encyclopedia
Jump to: navigation, search

A resource bundle is a Java .properties file that contains locale-specific data.[1] It is a way of internationalising a Java application by making the code locale-independent.

Benefits of using resource bundles[edit]

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[edit]

Some CAT tools like OmegaT, OmegaT+,[2] 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.

JavaPM[3] is a free cross-platform utility that assists software developers in the localization of Java projects. JavaPM converts Java .properties files to XLIFF 1.2 format, allowing their localization using most modern CAT. Once the XLIFF files have been translated, JavaPM inserts the translations into the Java project, creating new .properties files or updating existing ones as necessary. It is not available anymore.

See also[edit]

References[edit]

  1. ^ O'Conner, B. Java Internationalization: Localization with ResourceBundles, Sun Developer Network.
  2. ^ OmegaT+
  3. ^ JavaPM