| java.lang.Object org.apache.wsrp4j.util.LocaleHelper
LocaleHelper | public class LocaleHelper (Code) | | |
Method Summary | |
public static String | getCountryCode(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].
Parameters: locale - The locale as String . | public static String | getLanguageCode(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].
Parameters: locale - The locale as String . | public static Locale | getLocale(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].
Parameters: locale - The locale as String . | public static Locale[] | getLocales(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].
Parameters: locales - The locale as String . | public static String | getWsrpLocale(Locale locale) The method takes a given Locale and returns a string
representation which is conform to the WSRP standard.
Parameters: locale - The Locale to be formatted. |
getCountryCode | public static String getCountryCode(String locale)(Code) | | 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].
Parameters: locale - The locale as String . The country code. |
getLanguageCode | public static String getLanguageCode(String locale)(Code) | | 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].
Parameters: locale - The locale as String . The language code. |
getLocale | public static Locale getLocale(String locale)(Code) | | 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].
Parameters: locale - The locale as String . The corresponding Locale object. |
getLocales | public static Locale[] getLocales(String[] locales)(Code) | | 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].
Parameters: locales - The locale as String . The corresponding Locale object. |
getWsrpLocale | public static String getWsrpLocale(Locale locale)(Code) | | The method takes a given Locale and returns a string
representation which is conform to the WSRP standard.
Parameters: locale - The Locale to be formatted. A string representation of the given locale which is conform to the WSRP standard. |
|
|