|
Jive Messenger 2.2.2 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 String |
getLocalizedNumber(double number)
|
static String |
getLocalizedNumber(double number,
Locale locale)
|
static String |
getLocalizedNumber(long number)
|
static String |
getLocalizedNumber(long number,
Locale locale)
|
static String |
getLocalizedString(String key)
Returns an internationalized string loaded from a resource bundle. |
static String |
getLocalizedString(String key,
List arguments)
Returns an internationalized string loaded from a resource bundle using the locale specified by JiveGlobals.getLocale() substituting the passed in arguments. |
static String |
getLocalizedString(String key,
Locale locale)
Returns an internationalized string loaded from a resource bundle using the passed in Locale. |
static String |
getLocalizedString(String key,
Locale locale,
List arguments)
Returns an internationalized string loaded from a resource bundle using the passed in Locale substituting the passed in arguments. |
static ResourceBundle |
getResourceBundle(String baseName,
Locale locale)
Returns the specified resource bundle, which is a properties file that aids in localization of skins. |
static String[][] |
getTimeZoneList()
Returns a list of all available time zone's as a String [][]. |
static Locale |
localeCodeToLocale(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 Locale localeCodeToLocale(String localeCode)
localeCode
- the locale code for a Java locale. See the Locale
class for more details.public static String[][] getTimeZoneList()
Normally, there are many ID's that correspond to a single display name. However, the list has been paired down so that a display name only appears once. Normally, the time zones will be returned in order: -12 GMT,..., +0GMT,... +12GMT..., etc.
public static ResourceBundle getResourceBundle(String baseName, Locale locale)
baseName
- the name of the resource bundle to load.locale
- the desired Locale.
public static String getLocalizedString(String key)
key
- the key to use for retrieving the string from the
appropriate resource bundle.
public static String getLocalizedString(String key, 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 String getLocalizedString(String key, 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 String getLocalizedString(String key, Locale locale, 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 String getLocalizedNumber(long number)
public static String getLocalizedNumber(long number, Locale locale)
public static String getLocalizedNumber(double number)
public static String getLocalizedNumber(double number, Locale locale)
|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |