public class I18N extends Object
Modifier and Type | Field and Description |
---|---|
private static ResourceBundle |
GUILABELS_BUNDLE |
private static ResourceBundle |
MESSAGES_BUNDLE |
Constructor and Description |
---|
I18N() |
Modifier and Type | Method and Description |
---|---|
static String |
getGUILabelText(String key)
This method fetches a String Object from a given String
key in a specific resource file
addressed by ResourceBundle GUILABELS_BUNDLE . |
static String |
getGUILabelText(String key,
Object... params)
This method fetches a String Object from a given String
key in a specific resource file
addressed by ResourceBundle GUILABELS_BUNDLE . |
static String |
getMessage(String key)
This method fetches a String Object from a given String
key in a specific resource file
addressed by ResourceBundle MESSAGES_BUNDLE . |
static String |
getMessage(String key,
Object... params)
This method fetches a String Object from a given String
key in a specific resource file
addressed by ResourceBundle MESSAGES_BUNDLE . |
private static String |
getString(String key,
ResourceBundle rb)
This method fetches a String Object from a given String
key in a specific resource file
addressed by ResourceBundle rb . |
private static final ResourceBundle MESSAGES_BUNDLE
private static final ResourceBundle GUILABELS_BUNDLE
private static String getString(String key, ResourceBundle rb)
key
in a specific resource file
addressed by ResourceBundle rb
. It returns '!key!' if the required value is not found
for the key.key
- rb
- key
+'!'.public static String getMessage(String key)
key
in a specific resource file
addressed by ResourceBundle MESSAGES_BUNDLE
. It returns '!key!' if the required value is not found
for the key.key
- public static String getMessage(String key, Object... params)
key
in a specific resource file
addressed by ResourceBundle MESSAGES_BUNDLE
. Additionally an Object... params
can be
specified. It returns the phrase or '!'+key
+'!'.
for the key.key
- key
+'!'.public static String getGUILabelText(String key)
key
in a specific resource file
addressed by ResourceBundle GUILABELS_BUNDLE
. It returns '!key!' if the required value is not found
for the key.key
- public static String getGUILabelText(String key, Object... params)
key
in a specific resource file
addressed by ResourceBundle GUILABELS_BUNDLE
. Additionally an Object... params
can be
specified. It returns the phrase or '!'+key
+'!'.
for the key.key
- key
+'!'.Copyright © 2009–2016 Helmut Ahammer, Philipp Kainz. All rights reserved.