public interface Localizer
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLanguage()
Returns the ISO language code of the java.util.Locale object currently used for rendering
|
java.util.Locale |
getLocale()
Returns the java.util.Locale object that is currently used for formatting
|
java.lang.String |
localize(java.util.Date date,
java.lang.String patternCode)
Returns a String representing the specified Date object using the format pattern that is represented
by the specified code.
|
java.lang.String |
localize(double number,
int digits)
Renders the specified double value with exactly the number of specified
digits and according to the rulse imposed by the currently used Locale object of
this Localizer instance.
|
java.lang.String |
localize(long number)
Returns a String representing the specified long value and rendered for the currently
used Locale of this Localizer instance.
|
java.lang.String |
localize(java.lang.String code)
Returns some locale specific, human readable text for the specified code,
or the code unchanged if no such translation could be done,
|
java.lang.String |
localize(java.lang.String code,
java.lang.Object replacementValue)
Returns some locale specific, human readable text for the specified code,
filled with the specified replacement value using java.text.MessageFormat syntax.
|
java.lang.String |
localize(java.lang.String code,
java.lang.Object[] replacementValues)
Returns some locale specific, human readable text for the specified code,
filled with the specified replacement values using java.text.MessageFormat syntax.
|
java.util.Date |
parseDate(java.lang.String date,
java.lang.String patternCode)
Returns the java.util.Date object that is represented by the specified String.
|
java.lang.Double |
parseDouble(java.lang.String doubleNumber)
Returns the double value that is represented by the specified String, or throws
a ParseException if parsing fails.
|
java.lang.Integer |
parseInt(java.lang.String integerNumber)
Returns the int value that is represented by the specified String, or throws
a ParseException if parsing fails.
|
java.lang.Long |
parseLong(java.lang.String longNumber)
Returns the long value that is represented by the specified String, or throws
a ParseException if parsing fails.
|
java.util.Locale getLocale()
java.lang.String getLanguage()
java.lang.String localize(java.lang.String code)
code
- application internal code for some textjava.lang.String localize(java.lang.String code, java.lang.Object replacementValue)
localize()
method.code
- application internal code for some textreplacementValue
- object that shall be filled into the place holder of the resulting text.localize(String, Object[])
java.lang.String localize(java.lang.String code, java.lang.Object[] replacementValues)
code
- application internal code for some textreplacementValues
- objects that shall be filled into the place holder of the resulting text.MessageFormat
java.lang.String localize(long number)
number
- value to be rendered.java.lang.String localize(double number, int digits)
number
- value to be rendered.java.lang.String localize(java.util.Date date, java.lang.String patternCode)
date
- date to be rendered.patternCode
- refering a special date patternjava.lang.Integer parseInt(java.lang.String integerNumber)
integerNumber
- String that represents an integer valuejava.lang.Long parseLong(java.lang.String longNumber)
longNumber
- String that represents a long valuejava.lang.Double parseDouble(java.lang.String doubleNumber)
doubleNumber
- String that represents a double valuejava.util.Date parseDate(java.lang.String date, java.lang.String patternCode)
date
- String that represents a datepatternCode
- refering a special date pattern