resource bundle

A set of locale-specific texts, looked up by key, that ResourceBundle.getBundle chooses for a locale.

In more detail

getBundle searches the requested locale's files from most to least specific, then the default locale's, then the base bundle. A key missing from the chosen bundle is looked up in its parents. A key found nowhere throws MissingResourceException.

Example

ResourceBundle.getBundle("Labels", Locale.CANADA_FRENCH).getString("greeting")

Related terms

Taught in

References

Certification courses