Class f_locale

Object
  extended by f_locale

public final class f_locale
extends Object


Field Summary
static Number LONG
          Long form.
static Number MEDIUM
          Medium form.
static Number SHORT
          Short form.
 
Method Summary
static f_locale Get()
           
 String f_formatMessage(String key, any... params)
          Format a JSF messages associated to a key.
 String f_formatMessageParams(String key, any[] params, String defaultValue)
          Format a JSF messages associated to a key.
 String f_getCountry()
          Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.
 String f_getDateFormat(Number form)
           
 String f_getDayName(Number n, Number form)
           
 Number f_getFirstDayOfWeek()
           
 String f_getLanguage()
          Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.
 String f_getMessage(String key, String defaultValue)
          Returns a JSF messages associated to a key.
 String f_getMonthName(Number n, Number form)
           
 String f_getName()
          Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars.
 Number f_getTwoDigitYearStart()
           
 String f_getVariant()
          Returns the variant code for this locale.
 
Methods inherited from class Object
toString
 

Field Detail

SHORT

public static final Number SHORT
Short form.


MEDIUM

public static final Number MEDIUM
Medium form.


LONG

public static final Number LONG
Long form.

Method Detail

f_getFirstDayOfWeek

public Number f_getFirstDayOfWeek()

f_getDateFormat

public String f_getDateFormat(Number form)
Parameters:
form - Form of date (SHORT, MEDIUM, LONG)
See Also:
#LONG, #SHORT, #MEDIUM

f_getVariant

public String f_getVariant()
Returns the variant code for this locale.


f_getTwoDigitYearStart

public Number f_getTwoDigitYearStart()

f_getCountry

public String f_getCountry()
Returns the country/region code for this locale, which will either be the empty string or an upercase ISO 3166 2-letter code.


f_formatMessage

public String f_formatMessage(String key,
                              any... params)
Format a JSF messages associated to a key.

Parameters:
key -
params -
See Also:
f_resourceBundle#f_format

f_getDayName

public String f_getDayName(Number n,
                           Number form)
Parameters:
n - Day number (0 to 6)
form - Form of name (SHORT, MEDIUM, LONG)
See Also:
#LONG, #SHORT, #MEDIUM

f_getMonthName

public String f_getMonthName(Number n,
                             Number form)
Parameters:
n - Month number (0 to 11)
form - Form of name (SHORT, MEDIUM, LONG)
See Also:
#LONG, #SHORT, #MEDIUM

f_getName

public String f_getName()
Getter for the programmatic name of the entire locale, with the language, country and variant separated by underbars. Language is always lower case, and country is always upper case.


f_getMessage

public String f_getMessage(String key,
                           String defaultValue)
Returns a JSF messages associated to a key.

Parameters:
key -
defaultValue -
See Also:
f_resourceBundle#f_get

Get

public static final f_locale Get()

f_getLanguage

public String f_getLanguage()
Returns the language code for this locale, which will either be the empty string or a lowercase ISO 639 code.


f_formatMessageParams

public String f_formatMessageParams(String key,
                                    any[] params,
                                    String defaultValue)
Format a JSF messages associated to a key.

Parameters:
key -
params -
defaultValue -
See Also:
f_resourceBundle#f_formatParams