Package org.apache.abdera.i18n.text
Class Localizer
- java.lang.Object
-
- org.apache.abdera.i18n.text.Localizer
-
public final class Localizer extends Object
Wraps ResourceBundle with a couple of additional, useful methods. Used for l10n
-
-
Constructor Summary
Constructors Constructor Description Localizer()
Localizer(String bundle)
Localizer(String bundle, Locale locale)
Localizer(Locale locale, ClassLoader loader)
Localizer(ResourceBundle bundle)
Localizer(ResourceBundle bundle, Locale locale)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
format(String key, Object... args)
Deprecated.String
formatValue(String key, Object... args)
Deprecated.static String
get(String key)
static String
get(String key, String defaultValue)
static Localizer
getInstance()
Locale
getLocale()
String
getValue(String key)
String
getValue(String key, String defaultValue)
static void
setInstance(Localizer localizer)
static String
sprintf(String key, Object... args)
String
sprintfValue(String key, Object... args)
Use the JDK 1.5 sprintf style Formatter
-
-
-
Constructor Detail
-
Localizer
public Localizer()
-
Localizer
public Localizer(Locale locale, ClassLoader loader)
-
Localizer
public Localizer(String bundle)
-
Localizer
public Localizer(ResourceBundle bundle)
-
Localizer
public Localizer(ResourceBundle bundle, Locale locale)
-
-
Method Detail
-
getInstance
public static Localizer getInstance()
-
setInstance
public static void setInstance(Localizer localizer)
-
getLocale
public Locale getLocale()
-
formatValue
public String formatValue(String key, Object... args)
Deprecated.Use the pre-JDK 1.5 MessageFormat. This should be avoided. Applications should use the sprintfValue method instead- See Also:
springfValue
-
-