|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.I18n
public class I18n
Internationalization class.
Constructor Summary | |
---|---|
I18n(java.lang.String translationsBundle)
Make an internationalisation object with the given bundle. |
Method Summary | |
---|---|
java.lang.String |
getString(java.util.Locale locale,
java.lang.String label,
java.lang.Object... args)
Get a localized message for a given locale and label, and optionally arguments. |
static java.lang.String |
getString(java.lang.String bundleName,
java.util.Locale locale,
java.lang.String label,
java.lang.Object... args)
Get a localized message for a given resource bundle, locale and label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I18n(java.lang.String translationsBundle)
Method Detail |
---|
public java.lang.String getString(java.util.Locale locale, java.lang.String label, java.lang.Object... args)
ResourceBundle.getString(java.lang.String)
, this method is
forgiving on errors
locale
- The locale to get the string forlabel
- The label of the string in the resource bundleargs
- Any args required for formatting the label
ArgumentNotValid
- on null or empty local or label.public static java.lang.String getString(java.lang.String bundleName, java.util.Locale locale, java.lang.String label, java.lang.Object... args)
ResourceBundle.getString(java.lang.String)
, this method is
forgiving on errors
I18n.getString("dk.netarkivet.common.Translations",
Locale.default, "job.unknown.id", 17)
bundleName
- The name of the resource bundle, fully qualified, but
without the properties.
See ResourceBundle.getBundle(String)
locale
- The locale to get the string forlabel
- The label of the string in the resource bundleargs
- Any args required for formatting the label
ArgumentNotValid
- on null bundleName, locale or label.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |