Usage involves retrieving strings via base names of the resource bundles or by using predefined types which represent specific views or components in the application.
| Modifier and Type | Class and Description |
|---|---|
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | |
| private static Locale | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ResourceBundle | |
| public static String | |
| public static String | Returns: the localized string.the type of the resource bundle. type,the key for the desired string in the bundle. key)Retrieves a localized string from the resource bundle associated with a given type. |
| private static String | |
| public static void |
| BUNDLES | back to summary |
|---|---|
| private static final Map<String, ResourceBundle> BUNDLES | |
| currentLocale | back to summary |
|---|---|
| private static Locale currentLocale | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| ResourceBundleManager | back to summary |
|---|---|
| private ResourceBundleManager() | |
| getBundle | back to summary |
|---|---|
| public static ResourceBundle getBundle(String baseName) Retrieves the resource bundle for the specified base name and the current application locale. This method will return a cached bundle if it exists, or load a new bundle if it does not.
| |
| getString | back to summary |
|---|---|
| public static String getString(String baseName, String key) Retrieves a localized string from the resource bundle specified by the base name. If the key is not found, it logs a warning and returns the key itself. | |
| getString | back to summary |
|---|---|
| public static String getString(ResourceBundleManager. Retrieves a localized string from the resource bundle associated with a given type.
| |
| key | back to summary |
|---|---|
| private static String key(String baseName, Locale locale) Generates a unique key based on the base name and locale for caching purposes. | |
| setLocale | back to summary |
|---|---|
| public static void setLocale(Locale locale) Sets the current locale of the application. If the locale is changed, the method clears the cache of loaded resource bundles.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final ResourceBundleManager. | |
| public static final ResourceBundleManager. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public static ResourceBundleManager. | |
| public static ResourceBundleManager. |
| baseName | back to summary |
|---|---|
| private final String baseName | |
| INFO_CENTER_VIEW | back to summary |
|---|---|
| public static final ResourceBundleManager. | |
| NOTIFICATION_VIEW | back to summary |
|---|---|
| public static final ResourceBundleManager. | |
| Type | back to summary |
|---|---|
| private Type(String baseName) | |
| getBaseName | back to summary |
|---|---|
| public String getBaseName() | |
| valueOf | back to summary |
|---|---|
| public static ResourceBundleManager. | |
| values | back to summary |
|---|---|
| public static ResourceBundleManager. | |