java.lang.Object
com.googlecode.lanterna.bundle.BundleLocator
- Direct Known Subclasses:
LocalizedUIBundle
This class permits to deal easily with bundles.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ResourceBundle
Gets the right bundle.
A cache is handled as well as the concurrent accesses.protected String
getBundleKeyValue
(Locale locale, String key, Object... parameters) Method that centralizes the way to get the value associated to a bundle key.
-
Field Details
-
bundleName
-
loader
-
-
Constructor Details
-
BundleLocator
Hidden constructor.- Parameters:
bundleName
- the name of the bundle.
-
-
Method Details
-
getBundleKeyValue
Method that centralizes the way to get the value associated to a bundle key.- Parameters:
locale
- the locale.key
- the key searched for.parameters
- the parameters to apply to the value associated to the key.- Returns:
- the formatted value associated to the given key. Empty string if no value exists for the given key.
-
getBundle
Gets the right bundle.
A cache is handled as well as the concurrent accesses.- Parameters:
locale
- the locale.- Returns:
- the instance of the bundle.
-