|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.visualization.datasource.base.LocaleUtil
public class LocaleUtil
A utility class for locale handling.
| Method Summary | |
|---|---|
static com.ibm.icu.util.ULocale |
getDefaultLocale()
Returns the default locale. |
static Locale |
getLocaleFromLocaleString(String s)
Converts a locale string from the RFC 3066 standard format to the Java locale format. |
static String |
getLocalizedMessageFromBundle(String bundleName,
String key,
Locale locale)
Returns a localized message from the specified ResourceBundle for the given key. |
static String |
getLocalizedMessageFromBundleWithArguments(String bundleName,
String key,
String[] args,
Locale locale)
Returns a localized message from the specified ResourceBundle for the given key
with the given arguments inserted to the message in the specified locations. |
static void |
setDefaultLocale(com.ibm.icu.util.ULocale defaultLocale)
Sets the default locale. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Locale getLocaleFromLocaleString(String s)
s - The locale string.
public static void setDefaultLocale(com.ibm.icu.util.ULocale defaultLocale)
defaultLocale - The default locale.public static com.ibm.icu.util.ULocale getDefaultLocale()
public static String getLocalizedMessageFromBundle(String bundleName,
String key,
Locale locale)
ResourceBundle for the given key.
In case the locale is null, uses the default locale.
If locale is null, the default ResourceBundle is used.
bundleName - The name of the resource bundle.key - The key of the requested string.locale - The locale.
public static String getLocalizedMessageFromBundleWithArguments(String bundleName,
String key,
String[] args,
Locale locale)
ResourceBundle for the given key
with the given arguments inserted to the message in the specified locations.
In case the locale is null, uses the default locale.
If locale is null, the default ResourceBundle is used.
bundleName - The name of the resource bundle.key - The key of the requested string.args - Arguments to place in the error message.locale - The locale.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||