|
Connection Manager 3.5.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.util.LocaleUtils
public class LocaleUtils
A set of methods for retrieving and converting locale specific strings and numbers.
Method Summary | |
---|---|
static java.lang.String |
getLocalizedNumber(double number)
|
static java.lang.String |
getLocalizedNumber(double number,
java.util.Locale locale)
|
static java.lang.String |
getLocalizedNumber(long number)
|
static java.lang.String |
getLocalizedNumber(long number,
java.util.Locale locale)
|
static java.lang.String |
getLocalizedString(java.lang.String key)
Returns an internationalized string loaded from a resource bundle. |
static java.lang.String |
getLocalizedString(java.lang.String key,
java.util.List arguments)
Returns an internationalized string loaded from a resource bundle using the locale specified by JiveGlobals.getLocale() substituting the passed in arguments. |
static java.lang.String |
getLocalizedString(java.lang.String key,
java.util.Locale locale)
Returns an internationalized string loaded from a resource bundle using the passed in Locale. |
static java.lang.String |
getLocalizedString(java.lang.String key,
java.util.Locale locale,
java.util.List arguments)
Returns an internationalized string loaded from a resource bundle using the passed in Locale substituting the passed in arguments. |
static java.util.ResourceBundle |
getResourceBundle(java.lang.String baseName,
java.util.Locale locale)
Returns the specified resource bundle, which is a properties file that aids in localization of skins. |
static java.lang.String[][] |
getTimeZoneList()
Returns a list of all available time zone's as a String [][]. |
static java.lang.String |
getTimeZoneName(java.lang.String zoneID,
java.util.Locale locale)
Returns the display name for a time zone. |
static java.util.Locale |
localeCodeToLocale(java.lang.String localeCode)
Converts a locale string like "en", "en_US" or "en_US_win" to a Java locale object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Locale localeCodeToLocale(java.lang.String localeCode)
localeCode
- the locale code for a Java locale. See the Locale
class for more details.public static java.lang.String[][] getTimeZoneList()
The list of time zones attempts to be inclusive of all of the worlds zones while being as concise as possible. For "en" language locales the name is a friendly english name. For non-"en" language locales the standard JDK name is used for the given Locale. The GMT+/- time is also included for readability.
public static java.lang.String getTimeZoneName(java.lang.String zoneID, java.util.Locale locale)
zoneID
- the time zone to get the name for.locale
- the locale to use.
public static java.util.ResourceBundle getResourceBundle(java.lang.String baseName, java.util.Locale locale)
baseName
- the name of the resource bundle to load.locale
- the desired Locale.
public static java.lang.String getLocalizedString(java.lang.String key)
key
- the key to use for retrieving the string from the
appropriate resource bundle.
public static java.lang.String getLocalizedString(java.lang.String key, java.util.Locale locale)
key
- the key to use for retrieving the string from the
appropriate resource bundle.locale
- the locale to use for retrieving the appropriate
locale-specific string.
public static java.lang.String getLocalizedString(java.lang.String key, java.util.List arguments)
MessageFormat
class.
key
- the key to use for retrieving the string from the
appropriate resource bundle.arguments
- a list of objects to use which are formatted, then
inserted into the pattern at the appropriate places.
public static java.lang.String getLocalizedString(java.lang.String key, java.util.Locale locale, java.util.List arguments)
MessageFormat
class.
key
- the key to use for retrieving the string from the
appropriate resource bundle.locale
- the locale to use for retrieving the appropriate
locale-specific string.arguments
- a list of objects to use which are formatted, then
inserted into the pattern at the appropriate places.
public static java.lang.String getLocalizedNumber(long number)
public static java.lang.String getLocalizedNumber(long number, java.util.Locale locale)
public static java.lang.String getLocalizedNumber(double number)
public static java.lang.String getLocalizedNumber(double number, java.util.Locale locale)
|
Connection Manager 3.5.1 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |