|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wsrp4j.util.LocaleHelper
public class LocaleHelper
Constructor Summary | |
---|---|
LocaleHelper()
|
Method Summary | |
---|---|
static java.lang.String |
getCountryCode(java.lang.String locale)
Gets the country code from a locales string representation, assuming that the provided locale has a format like [2 char language code]"-"[2 char country code]. |
static java.lang.String |
getLanguageCode(java.lang.String locale)
Gets the language code from a locales string representation, assuming that the provided locale has a format like [2 char language code]"-"[2 char country code]. |
static java.util.Locale |
getLocale(java.lang.String locale)
Convinence method to create a Locale object from a locales
string representation, assuming that the provided locale has a format like
[2 char language code]"-"[2 char country code]. |
static java.util.Locale[] |
getLocales(java.lang.String[] locales)
Convinence method to create a Locale object array from a locales
string array representation, assuming that the provided locale has a format like
[2 char language code]"-"[2 char country code]. |
static java.lang.String |
getWsrpLocale(java.util.Locale locale)
The method takes a given Locale and returns a string
representation which is conform to the WSRP standard. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocaleHelper()
Method Detail |
---|
public static java.lang.String getLanguageCode(java.lang.String locale)
locale
- The locale as String
.
public static java.lang.String getCountryCode(java.lang.String locale)
locale
- The locale as String
.
public static java.util.Locale getLocale(java.lang.String locale)
Locale
object from a locales
string representation, assuming that the provided locale has a format like
[2 char language code]"-"[2 char country code].
locale
- The locale as String
.
Locale
object.public static java.lang.String getWsrpLocale(java.util.Locale locale)
Locale
and returns a string
representation which is conform to the WSRP standard.
locale
- The Locale
to be formatted.
public static java.util.Locale[] getLocales(java.lang.String[] locales)
Locale
object array from a locales
string array representation, assuming that the provided locale has a format like
[2 char language code]"-"[2 char country code].
locales
- The locale as String
.
Locale
object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |