org.pentaho.platform.util.messages
Class LocaleHelper

java.lang.Object
  extended by org.pentaho.platform.util.messages.LocaleHelper

public class LocaleHelper
extends Object


Field Summary
static int FORMAT_FULL
           
static int FORMAT_IGNORE
           
static int FORMAT_LONG
           
static int FORMAT_MEDIUM
           
static int FORMAT_SHORT
           
static String LEFT_TO_RIGHT
           
static String UTF_8
           
 
Constructor Summary
LocaleHelper()
           
 
Method Summary
static String getClosestLocale(String locale, String[] locales)
           
static NumberFormat getCurrencyFormat()
           
static DateFormat getDateFormat(int dateFormat, int timeFormat)
           
static Locale getDefaultLocale()
           
static DateFormat getFullDateFormat(boolean date, boolean time)
           
static Locale getLocale()
           
static DateFormat getLongDateFormat(boolean date, boolean time)
           
static DateFormat getMediumDateFormat(boolean date, boolean time)
           
static NumberFormat getNumberFormat()
           
static DateFormat getShortDateFormat(boolean date, boolean time)
           
static String getSystemEncoding()
           
static String getTextDirection()
           
static void setDefaultLocale(Locale newLocale)
           
static void setLocale(Locale newLocale)
           
static void setSystemEncoding(String encoding)
           
static void setTextDirection(String textDirection)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_SHORT

public static final int FORMAT_SHORT
See Also:
Constant Field Values

FORMAT_MEDIUM

public static final int FORMAT_MEDIUM
See Also:
Constant Field Values

FORMAT_LONG

public static final int FORMAT_LONG
See Also:
Constant Field Values

FORMAT_FULL

public static final int FORMAT_FULL
See Also:
Constant Field Values

FORMAT_IGNORE

public static final int FORMAT_IGNORE
See Also:
Constant Field Values

UTF_8

public static final String UTF_8
See Also:
Constant Field Values

LEFT_TO_RIGHT

public static final String LEFT_TO_RIGHT
See Also:
Constant Field Values
Constructor Detail

LocaleHelper

public LocaleHelper()
Method Detail

setDefaultLocale

public static void setDefaultLocale(Locale newLocale)

getDefaultLocale

public static Locale getDefaultLocale()

setLocale

public static void setLocale(Locale newLocale)

getLocale

public static Locale getLocale()

setSystemEncoding

public static void setSystemEncoding(String encoding)

setTextDirection

public static void setTextDirection(String textDirection)

getSystemEncoding

public static String getSystemEncoding()

getTextDirection

public static String getTextDirection()

getDateFormat

public static DateFormat getDateFormat(int dateFormat,
                                       int timeFormat)

getShortDateFormat

public static DateFormat getShortDateFormat(boolean date,
                                            boolean time)

getMediumDateFormat

public static DateFormat getMediumDateFormat(boolean date,
                                             boolean time)

getLongDateFormat

public static DateFormat getLongDateFormat(boolean date,
                                           boolean time)

getFullDateFormat

public static DateFormat getFullDateFormat(boolean date,
                                           boolean time)

getNumberFormat

public static NumberFormat getNumberFormat()

getCurrencyFormat

public static NumberFormat getCurrencyFormat()

getClosestLocale

public static String getClosestLocale(String locale,
                                      String[] locales)